Backtest a simple buying rule on past prices
etoro_backtestHow a simple rule would have done over a window of past prices: 'buy_and_hold' (one purchase of amountUsd at the start) or 'dca' (amountUsd every everyDays days).
Instructions
How a simple rule would have done over a window of past prices: 'buy_and_hold' (one purchase of amountUsd at the start) or 'dca' (amountUsd every everyDays days). Returns what was invested, the units and average cost, the value at the end, the result, the worst fall on the way and, for dca, the same total invested in one go at the start for comparison. Unleveraged, with eToro's historical candles (bid prices; no spread, fees, overnight costs or dividends). It places nothing and prepares nothing. A simulation of the rule you gave on past prices, not a prediction, a recommendation or financial advice. Nothing was sent to eToro and nothing was prepared.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of the window (exclusive). Default: now. | |
| from | Yes | Start of the window, ISO 8601 with timezone, e.g. 2025-01-01T00:00:00Z. | |
| symbol | No | Exact ticker, e.g. 'AAPL'. Provide symbol or instrumentId. | |
| interval | No | Candle size. Daily is enough for most questions; smaller candles find stops and targets more precisely. | 1d |
| strategy | Yes | ||
| amountUsd | Yes | For buy_and_hold: the one purchase. For dca: each purchase. | |
| everyDays | No | dca only: days between purchases. | |
| instrumentId | No |