What historical data means
Historical data is a set of past observations that you record and later use for calculations, comparisons, or testing. In practice, it usually includes items like timestamps, observed values (for example, a price), and sometimes additional fields (for example, the spread or execution-related details). The key idea is that historical data is “input data from the past,” not a promise about what will happen next.
A worked example is useful because it forces you to state every assumption: which dates you used, how you computed returns, which costs you applied (or did not apply), and what happens when the data is incomplete.
How a worked example works (with explicit assumptions)
Below is a scenario that demonstrates historical data mechanics without relying on any live market data.
Scenario setup (all assumptions)
Assume you are analyzing a simple rule using 10 consecutive daily observations.
- Dates: Day 1 to Day 10 are fixed; you will not change them.
- Observed values: You have a historical “mid price” for each day. (You already know these mid prices from your dataset; you are not fetching them in real time.)
- Return definition: You define the daily return as (Close − Open) / Open for that day.
- Constant cost assumption: You assume a transaction cost of 0.10% per trade, applied whenever the rule says “trade.” If your dataset does not include costs, you must either (a) model costs, or (b) acknowledge that you tested a no-cost version.
- Rule logic (example rule): Trade on days where the previous day’s return is positive. On those trade days, assume you buy at the next day’s Open and exit at that day’s Close.
- Execution assumption: You assume you can execute at the recorded Open and Close used in the historical dataset (no slippage).
The mini dataset
Use these historical returns for Days 1–10. (They are your recorded values; treat them as given.)
- Day 1: Open 100, Close 102 → return = 0.02 (2%)
- Day 2: Open 102, Close 101 → return = -0.009803…
- Day 3: Open 101, Close 103 → return = 0.019802…
- Day 4: Open 103, Close 103 → return = 0
- Day 5: Open 103, Close 105 → return = 0.019417…
- Day 6: Open 105, Close 104 → return = -0.009523…
- Day 7: Open 104, Close 106 → return = 0.019231…
- Day 8: Open 106, Close 107 → return = 0.009434…
- Day 9: Open 107, Close 106 → return = -0.009345…
- Day 10: Open 106, Close 108 → return = 0.018868…
Applying the historical-data rule
The rule depends on the previous day’s return sign.
- You cannot trade on Day 1 because there is no “previous day” return. So start trading on Day 2.
Assume trade days are those where Day (t−1) return is positive.
- Day 2: previous (Day 1) return positive → trade Day 2. Net return = (Day 2 return) − 0.10% = -0.009803… − 0.001
- Day 3: previous (Day 2) return negative → no trade Day 3. Net return = 0
- Day 4: previous (Day 3) return positive → trade Day 4. Net return = 0 − 0.001
- Day 5: previous (Day 4) return zero → not positive, so no trade Day 5 (by this rule). Net return = 0
- Day 6: previous (Day 5) return positive → trade Day 6. Net return = -0.009523… − 0.001
- Day 7: previous (Day 6) return negative → no trade Day 7. Net return = 0
- Day 8: previous (Day 7) return positive → trade Day 8. Net return = 0.009434… − 0.001
- Day 9: previous (Day 8) return positive → trade Day 9. Net return = -0.009345… − 0.001
- Day 10: previous (Day 9) return negative → no trade Day 10. Net return = 0
What this example demonstrates
This scenario shows what historical data usage usually requires:
- A clear definition of computed fields (how returns are calculated).
- Explicit rule timing (whether you use previous-day info to act on the next day).
- A cost model assumption (here, a flat 0.10% per trade).
- Execution assumptions (no slippage; you use recorded Open/Close).
Different assumptions would produce different results, even if you keep the same historical dataset.
Material limitations and failure modes
Historical data is useful, but it has limitations that can make the “worked example” diverge from real outcomes.