Package Exports
- grademark
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (grademark) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
grademark
API for backtesting trading strategies in JavaScript and TypeScript.
WORK IN PROGRESS
The API is fairly stable, but there are features yet to be implemented.
This API builds on Data-Forge and is best used from Data-Forge Notebook (making it easy to plot charts and visualize).
TODO: Add link here to live notebook (mean reversion strategy).
To learn more about working with data in JavaScript please read my book Data Wrangling with JavaScript.
Features
- Backtest a trading strategy on a single instrument.
- Define a trading strategy with entry and exit rules.
- Apply custom indicators to your data series.
- Specify lookback period.
Coming soon
- Built in stop and loss and computation of risk/rmultiples.
- Conditional buy on price level (intrabar).
- Paramters
- Optimization based on permuations of parameters.
- Analysis
- Charting equity curves and drawdown
- Monte Carlo simulation
- Walk-forward backtesting
Missing
Due to this being a simple API there is no support (at least not yet) for:
- Fees
- Slippage
- Position sizing
- Testing multiple instruments / portfolio simulation / ranking instruments.
Installation
TODO
Loading data
TODO
From REST API
TODO
From CSV file
TODO
From MongoDB
TODO
Running a backtest
TODO
Visualizating the results
TODO