Small Node.js-based framework for backtesting options trading strategies. Allows creation of strategies and studies, and makes inclusion of studies within strategies easy.
- Install Node.js: https://nodejs.org/download/
- Install Gulp globally:
npm install -g gulp
- Download minute tick data for one security from a supported data provider.
- Dukascopy link: https://www.dukascopy.com/swiss/english/marketwatch/historical/
- Put the data into ./data/:
- mkdir ./data
- mv ~/Downloads/EURUSD_Candlestick_1_m_BID_04.08.2014-08.08.2015.csv ./data/
- Run the
backtest
gulp task- Example:
gulp backtest --symbol EURUSD --parser dukascopy --data ./data/EURUSD_Candlestick_1_m_BID_04.08.2014-08.08.2015.csv --strategy NateAug2015 --investment 1000 --profitability 0.7 --out ./data/processed/EURUSD_Candlestick_1_m_BID_04.08.2014-08.08.2015.csv
- Example:
symbol
-- The security symbolparser
-- The parser to use to parse the data you downloadeddata
-- The path to the data file you downloadedstrategy
-- The name of the strategy to useinvestment
-- The investment to use for each security purchase while backtestingprofitability
-- The profitability factor to useout
-- If specified, a CSV file will be created at the given path containing the data generated by the strategy.