Stop loss check
stop_loss_checkWhether a stop-loss would have helped, measured. The same buy of a coin, held 30, 90, 365 or 730 days, with a stop 5, 10, 15, 20 or 30% below the entry and without one, started on every day of the history. The stop fires on the day's low, not its close, and fees are charged to both. You get how often it fired, how often it sold a buy that would have ended in profit, and the worst case of each. Spot tape, dead coins included.
Use when asked whether a stop-loss protects a spot buy-and-hold. For leveraged positions, where liquidation is the stop, use leverage_survival; for a rule with a stop and a take-profit, strategy_grid_lookup.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| coin | Yes | Ticker or full pair. An unknown one comes back with the list we hold and the ones left out. | |
| days | Yes | Holding period in days: 30, 90, 365 or 730. | |
| stop | Yes | How far below the entry, in percent: 5, 10, 15, 20 or 30. 0.05 is read as 5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | false when we do not hold that data. Never a zero standing in for an answer. | |
| buys | No | Start days tested. Fewer than 120 and we refuse to give a percentage. | |
| error | No | no_data when ok is false. | |
| model | No | The assumptions, stated: the low triggers, fills at the stop or the gap open, out until the end, same costs both ways. | |
| reason | No | Why, in one sentence, and what we do have instead. | |
| source | No | The public file these numbers come from. | |
| stop_fired | No | Buys on which the stop fired. A count. | |
| stop_fired_pct | No | The same as a share of buys. | |
| p05_with_stop_pct | No | Fifth percentile, with the stop: what the stop actually buys. | |
| stop_beat_holding | No | Buys on which the stop ended strictly ahead of holding. | |
| mean_with_stop_pct | No | Average buy, with the stop. | |
| median_days_to_fire | No | Among the buys it fired on. Null when it never fired. | |
| worst_with_stop_pct | No | The single worst buy, with the stop. Worse than the stop itself only when a day gapped through. | |
| median_with_stop_pct | No | Middle buy, with the stop. | |
| p05_without_stop_pct | No | The same, holding. | |
| mean_without_stop_pct | No | Average buy, holding. Skewed by a few huge winners. | |
| stop_beat_holding_pct | No | The same as a share of buys. | |
| worst_without_stop_pct | No | The same, holding. | |
| median_without_stop_pct | No | Middle buy, just holding. The alternative, always. | |
| share_in_profit_with_stop_pct | No | Share of buys that ended up, stop. | |
| share_in_profit_without_stop_pct | No | The same, holding. | |
| fired_but_would_have_ended_in_profit | No | Buys the stop sold that, held to the end, would have ended in profit after fees. The half nobody shows. | |
| fired_but_would_have_ended_in_profit_pct | No | The same as a share of ALL buys. |