diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 442af8e..c47d562 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,18 +15,20 @@ jobs:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '21'
- uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '9.0.x'
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~\.sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
@@ -37,19 +39,19 @@ jobs:
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- - name: Test
- run: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
- - name: Begin
+ - name: Begin SonarCloud Analysis
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
- run: .\.sonar\scanner\dotnet-sonarscanner begin /k:"mccaffers_backtesting-engine" /o:"mccaffers" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="./tests/coverage.opencover.xml"
+ run: .\.sonar\scanner\dotnet-sonarscanner begin /k:"mccaffers_backtesting-engine" /o:"mccaffers" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.cs.opencover.reportsPaths="./tests/coverage.opencover.xml"
- name: Build
- run: dotnet build
- - name: Sonar End
+ run: dotnet build
+ - name: Test
+ run: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
+ - name: End SonarCloud Analysis
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
\ No newline at end of file
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 0acf142..a5e13f6 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -36,16 +36,17 @@ jobs:
steps:
- - uses: actions/setup-dotnet@v1
+ - uses: actions/checkout@v5
+ - name: Setup dotnet
+ uses: actions/setup-dotnet@v5
with:
- dotnet-version: 8.0.x
-
- - name: Checkout repository
- uses: actions/checkout@v2
+ dotnet-version: |
+ 8.0.x
+ 9.0.x
# Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ - name: CodeQL Initialize
+ uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +57,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ uses: github/codeql-action/autobuild@v4
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -65,9 +66,8 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language
-# - name: build
-# run: dotnet build
-
+ # - name: build
+ # run: dotnet build
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ uses: github/codeql-action/analyze@v4
diff --git a/.gitignore b/.gitignore
index c401cd2..8f4a518 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,4 +37,13 @@ engine.zip
tickdata/
scripts/data.sh
src/ui/src/libs/
-scripts/backtestings/data.sh
\ No newline at end of file
+scripts/backtestings/data.sh
+
+.env
+.env.*
+!.env.example
+*.pem
+*.key
+*.p12
+appsettings.*.json
+!appsettings.Development.json
\ No newline at end of file
diff --git a/README.md b/README.md
index d601aa1..75c44b7 100644
--- a/README.md
+++ b/README.md
@@ -1,65 +1,102 @@
## C# Backtesting Engine
-### Active development
+> [!NOTE]
+> This project is maintained but no longer under active development. It receives periodic updates and improvements, but my primary focus has shifted to a **C++ implementation** for further experimentation. Check out the progress on the high-performance C++ version here: **[backtesting-engine-cpp](https://github.com/mccaffers/backtesting-engine-cpp)**
-Working build! Requires local tick data. Evaluate locally with `dotnet test` - 49 tests should pass, 1 skipped
+### Background
-## About The Project
+This is a high-performance C# backtesting engine designed to analyze financial data and evaluate multiple trading strategies at scale. The engine leverages **QuestDB** for efficient time-series data storage and retrieval, providing significantly faster query performance and more robust handling of tick-level financial data compared to traditional file-based approaches. This project serves as a practical demonstration of quantitative engineering capabilities, combining financial domain knowledge with modern software architecture and cloud infrastructure.
-I'm developing a high-performance C# backtesting engine designed to analyze financial data and evaluate multiple trading strategies at scale.
+> I initiated this project to deepen my understanding of financial markets while showcasing technical expertise through detailed documentation and transparent decision-making. By building a production-grade backtesting system from the ground up I've been able to explore real-world challenges in quantitative finance—from data pipeline optimisation to strategy evaluation frameworks. The project also initially investigates the practical benefits of cloud services, specifically AWS, for horizontally scaling strategy permutations and experiments.