Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

288 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quant.Infra.Net

.NET Version License

Quant.Infra.Net is a .NET quantitative trading infrastructure library — data acquisition, statistical analysis, broker integration, portfolio analytics, and notifications in one package.


Languages / 语言


What Is This? / 这是什么?

Quant.Infra.Net abstracts the complexity of connecting to financial data sources, brokers, and notification channels behind a unified C# API. You write strategy logic once — the library handles the rest.

Core Capabilities / 核心基础设施:

Module What It Does / 能力说明
Data Source / 数据源 Unified market data ingestion from Yahoo Finance & Binance (Spot/Futures), with local CSV/SQL persistence.
聚合多源行情(Yahoo/Binance),并支持本地持久化。
Broker & Orders / 订单执行 Standardized trading interfaces for Binance Futures, seamlessly switching between testnet simulation and live execution.
币安合约标准化交易接口,无缝切换测试网模拟与实盘下单。
Notification / 通知推送 Real-time strategy alerts via DingTalk bots, WeChat Work webhooks, and SMTP/Brevo email pipelines.
内置钉钉、企业微信及邮件通道,实现策略信号的即时触达。

For full module details and usage examples, see User Manual and Architecture Overview.


Architecture / 架构

┌─────────────────────────────────────────────────────────────────┐
│                     Your Strategy Logic                          │
│                  (Write once, run anywhere)                       │
└──────────────────────┬──────────────────────────────────────────┘
                       │ IQuantInfraNet API
   ┌───────────────────┼──────────────────────────────────────────┐
   │                   │                                          │
   ▼                   ▼                                          ▼
┌──────────┐    ┌──────────────┐                          ┌──────────────┐
│  Source  │    │   Broker     │                          │ Notification │
│  Data    │    │   & Orders   │                          │              │
│          │    │              │                          │              │
│ Yahoo    │    │ Binance      │                          │ DingTalk     │
│ Finance  │    │ Futures      │                          │ WeChat Work  │
│ Binance  │    │ Alpaca       │                          │ Email (SMTP) │
│ Spot/Perp│    │ Schwab       │                          │ Brevo        │
│ CSV/SQL  │    │ Interactive  │                          │              │
└──────────┘    │ Brokers      │                          └──────────────┘
                │ (Testnet/Live)│
                └──────────────┘

Why this matters / 为什么重要:

  • One NuGet package — no juggling multiple SDKs from different vendors
  • Unified interfacesITraditionalFinanceSourceDataService, IBrokerService, IEmailService — swap implementations without changing your strategy code
  • Out-of-the-box analysis — ADF test, OLS regression, Z-Score, Sharpe ratio — all included

Quick Start / 快速开始

# Install via NuGet
dotnet add package Quant.Infra.Net --version 1.5.1
// Register all modules
var services = new ServiceCollection();
services.AddQuantInfraNet();

// Fetch OHLCV data from Yahoo Finance
var dataService = services.BuildServiceProvider()
    .GetService<ITraditionalFinanceSourceDataService>();
var bars = await dataService.GetOhlcvListAsync("AAPL", DateTime.Now.AddDays(-30), DateTime.Now);

// Place order via Binance Futures (testnet)
var binance = services.BuildServiceProvider()
    .GetService<IBinanceUsdFutureService>();
await binance.SetUsdFutureHoldingsAsync("BTCUSDT", 0.01, PositionSide.Long);

// Send notification alert when strategy triggers
var dingTalk = services.BuildServiceProvider()
    .GetService<IDingtalkService>();
await dingTalk.SendNotificationAsync("[Alert] BTC long position opened", token, secret);

Documentation / 文档

Document Description
User Manual / 使用手册 Installation, module usage guide, API examples
Architecture Overview / 架构概览 System design, module relationships, data flow
Code Standards / 代码规范 SOLID principles, XML docs, naming conventions, checklist

📖 GitHub Pages — full documentation site

Disclaimer: See DISCLAIMER for full disclaimer and limitation of liability / 详见免责声明了解完整免责条款与责任限制。

About

A one-stop .NET library for quantitative trading: multi-source data ingestion, unified broker execution (Binance/IB/Schwab), real-time alerting, and built-in portfolio analytics. 面向量化交易的一站式 .NET 基础库:多源数据接入、统一券商执行(币安/盈透/嘉信)、实时消息推送与内置组合分析工具。

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages