trade
Version:
A JavaScript backtesting library to validate trading strategies for stocks, futures, crypto currencies etc. based on historical data.
10 lines • 753 B
text/tab-separated-values
// ER: Exchange Rate
// PV: Point Value
// Only set margin and PV for open as they will most likely not be used for close (margin is only
// relevant when opening positions; PV does basically never ever change)
symbol date open openER openPV openMargin close closeER settleDiff
AAPL 2020-01-01 12.5 1.2 10 6.25 12.5 1.3 0
AAPL 2020-01-02 12.4 1.3 10 6.2 12.4 1.3 0
AMZN 2020-01-02 22.1 2 20 11.05 22.1 2.1 1
AAPL 2020-01-03 12.3 1.2 10 6.15 12.8 1.4 0
AMZN 2020-01-03 22.2 2.1 20 11.1 22.1 2.2 1