A collection of .NET 8 libraries for working with stock market data (OHLCV format).
dotnet add package Stocks.Data.Model
dotnet add package Stocks.Data.Infrastructure
dotnet add package Stocks.Data.Ef
dotnet add package Stocks.Data.Ado| Package | Description |
|---|---|
Stocks.Data.Model |
Domain model: StockQuote, Company, TradingSimulationResult |
Stocks.Data.Infrastructure |
CSV import helpers, OnTheFlyStats aggregation |
Stocks.Data.Ef |
EF Core repositories and Unit of Work for stock data |
Stocks.Data.Ado |
SQL Server bulk-insert via SqlBulkCopy |
- Abstract base class (
TradingSimulatorBase) for implementing custom trading simulators. - Simulation of trading strategies over configurable date ranges and stock universes.
- Integration with repositories for historical stock quotes.
- Progress reporting and logging support.
- Extensible design for custom signal generation and trading logic.
- .NET Standard 2.1 compatible environment (e.g., .NET Core 3.0+, .NET 5+, or .NET Framework 4.8+ with support).
- C# 8.0 or later.
-
Implement a Simulator: Derive from
TradingSimulatorBaseand implement theGetTopNmethod to define your stock selection logic. -
Run a Simulation: Use your simulator to run simulations with historical data and configuration.
TradingSimulatorBase: Abstract base for trading simulators.SimulationResult: Holds simulation results and statistics.TradingSimulationConfig: Configuration for simulation runs.StockQuote,StockTransaction: Data models for quotes and transactions.
- Implement custom trading strategies by overriding
GetTopN. - Use dependency injection for logging, data access, and configuration.