Skip to content

This backtesting engine is a personal project of mine, built in C# to explore and experiment with various trading strategies at scale.

License

Notifications You must be signed in to change notification settings

mccaffers/backtesting-engine

 
 

Repository files navigation

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.

Quality Gate Status

Features

  • Multiple symbol ingest with time synchronisation
  • xUnit testing
  • Trade Environment
    • Trade Excution
    • Equity Monitoring
  • Reporting (ElasticSearch)

Built With

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)

    # ./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

(back to top)

About

This backtesting engine is a personal project of mine, built in C# to explore and experiment with various trading strategies at scale.

Topics

Resources

License

Stars

Watchers

Forks