https://github.com/mccaffers/backtesting-engine
This backtesting engine is a personal project of mine, built in C# to explore and experiment with various trading strategies at scale.
https://github.com/mccaffers/backtesting-engine
backtesting trading trading-platform
Last synced: 5 months ago
JSON representation
This backtesting engine is a personal project of mine, built in C# to explore and experiment with various trading strategies at scale.
- Host: GitHub
- URL: https://github.com/mccaffers/backtesting-engine
- Owner: mccaffers
- License: mit
- Created: 2021-11-11T20:23:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-26T15:47:13.000Z (8 months ago)
- Last Synced: 2025-04-02T15:11:13.652Z (6 months ago)
- Topics: backtesting, trading, trading-platform
- Language: C#
- Homepage: https://mccaffers.com
- Size: 1.81 MB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
C# Backtesting Engine
By Ryan (mccaffers.com)
## About The Project
This backtesting engine is a personal project of mine, built in C# to explore and experiment with various trading strategies at scale.
[](https://sonarcloud.io/summary/overall?id=mccaffers_backtesting-engine)
### Features
* Multiple symbol ingest with time synchronisation
* xUnit testing
* Trade Environment
* Trade Excution
* Equity Monitoring
* Reporting (ElasticSearch)### Built With
* [dotnet](https://dotnet.com)
### Getting Started
#### Testing
`dotnet test`#### Demo Run (Working)
{placeholder}#### Local Terminal
sh ./scripts/backtesting/run.sh#### Local Web & Terminal
sh ./scripts/backtesting/web.sh### Dependencies
* dotnet v6
* Charting & Web use, need to accept dotnet's certificates `dotnet dev-certs https --trust`
* ElasticSearch for reporting
* CanvasJS used for charting
* JS libaries `canvasjs.min.js` to be placed within ./src/ui/src/libs/ folder
* Some financial tick data in CSV format, in the /src/tickdata folder (example provided)```bash
# ./tickdata/{symbol}/2020.csv:
UTC,AskPrice,BidPrice,AskVolume,BidVolume
2018-01-01T01:00:00.594+00:00,1.35104,1.35065,1.5,0.75
```### Debugging
If you have changed target frameworks, make sure to update the program path in .vscode `launch.json`
### Random Trading Strategy
accountEquity=0
maximumDrawndownPercentage=0### License
[MIT](https://choosealicense.com/licenses/mit/)