Skip to content

PFalkowski/StocksData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

151 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StocksData

CI NuGet (Model) NuGet (Infrastructure) NuGet (Ef) NuGet (Ado) Quality Gate Status License: MIT Buy Me a Coffee

A collection of .NET 8 libraries for working with stock market data (OHLCV format).

Install

dotnet add package Stocks.Data.Model
dotnet add package Stocks.Data.Infrastructure
dotnet add package Stocks.Data.Ef
dotnet add package Stocks.Data.Ado

Packages

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

Features

  • 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.

Getting Started

Prerequisites

  • .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.

Usage

  1. Implement a Simulator: Derive from TradingSimulatorBase and implement the GetTopN method to define your stock selection logic.

  2. Run a Simulation: Use your simulator to run simulations with historical data and configuration.

Key Classes

  • 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.

Extending

  • Implement custom trading strategies by overriding GetTopN.
  • Use dependency injection for logging, data access, and configuration.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages