Gravicode.Finance.LLM.Local 0.10.0

Prefix Reserved
dotnet add package Gravicode.Finance.LLM.Local --version 0.10.0
                    
NuGet\Install-Package Gravicode.Finance.LLM.Local -Version 0.10.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Gravicode.Finance.LLM.Local" Version="0.10.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Gravicode.Finance.LLM.Local" Version="0.10.0" />
                    
Directory.Packages.props
<PackageReference Include="Gravicode.Finance.LLM.Local" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Gravicode.Finance.LLM.Local --version 0.10.0
                    
#r "nuget: Gravicode.Finance.LLM.Local, 0.10.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Gravicode.Finance.LLM.Local@0.10.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Gravicode.Finance.LLM.Local&version=0.10.0
                    
Install as a Cake Addin
#tool nuget:?package=Gravicode.Finance.LLM.Local&version=0.10.0
                    
Install as a Cake Tool

<p align="center"> <img src="assets/icon-512.png" width="128" alt="Finance.Net logo" /> </p>

<h1 align="center">Finance.Net</h1>

<p align="center"> <b>The quantitative finance, trading, risk, portfolio, market-intelligence and financial-AI platform for .NET 10</b><br/> Native C# with Rust accelerators and ILGPU โ€” QuantLib, PyPortfolioOpt, pyfolio, Alphalens, Zipline/Backtrader, vectorbt, FinRL, OpenBB and FinGPT capabilities in one coherent library. </p>

<p align="center"> <i>Dibuat oleh Gravicode Studios dipimpin oleh Kang Fadhil ยท Made by Gravicode Studios, led by Kang Fadhil</i><br/> <a href="README.id.md">๐Ÿ‡ฎ๐Ÿ‡ฉ Baca dalam Bahasa Indonesia</a> ยท <a href="docs/en/index.md">Documentation</a> ยท <a href="docs/id/index.md">Dokumentasi</a> </p>

<p align="center"> <img src="docs/screenshots/00-overview.png" alt="Finance.Net Gallery overview" width="900" /> </p>


Why Finance.Net

  • One stack, one type system. Bars, orders, order books, curves, portfolios and backtests share the same Finance.Core types, so a market-data feed plugs straight into an indicator, a risk model, an optimiser and a broker.
  • Fast and frugal. Span-based APIs, SIMD statistics, O(n) rolling windows, parallel Monte Carlo with reproducible per-thread streams, optional Rust kernels and GPU pricing โ€” with a managed fallback for everything.
  • Correct before clever. Every module is tested against textbook reference values (Hull, Haug, QuantLib examples, scipy) or independent methods, not against its own output.
  • Built on the Gravicode foundation: Gravicode.Science (GraviNum linear algebra, GraviFrame data frames), HF.Net and Visual.Net, plus Gravicode.RLNet for deep reinforcement learning.

Modules

Package What you get
Gravicode.Finance.Core Bars, ticks, quotes, L2 order book, orders/fills/positions, instruments, money, day counts, tenors, business calendars (NYSE, IDX), reproducible RNG, synthetic markets
Gravicode.Finance.Math SIMD statistics, covariance & Ledoit-Wolf, dense matrices (Cholesky, LU, eigen via GraviNum), normal / Student-t, Brent & Newton, projected-gradient / Nelder-Mead, splines, OLS / ridge
Gravicode.Finance.DataFrame Columnar OHLCV frames, CSV, resampling, aligned multi-asset price panels, GraviFrame interop
Gravicode.Finance.TimeSeries Returns, drawdowns, O(n) rolling statistics, 248-entry indicator catalogue (188 indicators incl. Ehlers/Hilbert cycles and volume profile + 60 candlestick patterns), streaming indicators
Gravicode.Finance.MarketData Yahoo Finance, Alpha Vantage, Polygon, Binance, Coinbase, Alpaca, OANDA, Bybit, OKX, IDX, FRED, SEC EDGAR XBRL, CSV, synthetic; caching, rate limiting, WebSocket streaming, economic calendar, fundamentals
Gravicode.Finance.AlternativeData Social media (Reddit) sentiment & buzz, ESG analytics (WACI), supply-chain graphs (PageRank, shock contagion), weather (Open-Meteo, HDD/CDD)
Gravicode.Finance.Pricing Black-Scholes-Merton + full Greeks, implied vol, Black-76, Bachelier, CRR/trinomial trees, Monte Carlo (Asian, barrier, lookback), Heston, SABR, vol surfaces, curve bootstrapping, Nelson-Siegel-Svensson, bonds, FRNs, swaps, swaptions, forwards, CDS, structured notes, autocallables
Gravicode.Finance.Risk Historical / parametric / Cornish-Fisher / Monte Carlo VaR & ES, component VaR, Kupiec & Christoffersen backtests, stress testing, Monte Carlo portfolio simulation, pyfolio-style metrics, GARCH(1,1), EWMA
Gravicode.Finance.Portfolio Mean-variance (max Sharpe, min vol, efficient return/risk), Black-Litterman, risk parity / budgeting, HRP, CVaR optimisation, max diversification, discrete allocation, rebalancing
Gravicode.Finance.Backtesting Event-driven multi-asset engine, commission & slippage models, vectorised backtester, walk-forward optimisation, parameter sweeps, portfolio backtests, built-in strategies
Gravicode.Finance.Execution OMS, paper broker, FIX 4.4 / 5.0 SP2 engine with persistent sessions, Binance, Alpaca, OANDA, Bybit, OKX & Interactive Brokers (Web API + TWS socket) adapters, TWAP / VWAP / POV / Iceberg, smart order routing, pre-trade risk, TCA
Gravicode.Finance.ML Feature engineering, triple-barrier labelling, fractional differentiation, purged CV, linear/logistic/trees/forests/boosting, AR/ARIMA/Holt-Winters, Q-learning + RLNet DQN/PPO trading agents, factor models, Alphalens-style research, Kernel SHAP, PDP/ICE
Gravicode.Finance.LLM OpenAI, Azure OpenAI, Anthropic, Ollama, Hugging Face clients; streaming; tool calling; FinancialAssistant agent loop; FinGPT-style tasks; FinBERT
Gravicode.Finance.LLM.Local Local FinBERT run in-process through HF.Net โ€” no hosted API or credits (separate so Finance.LLM stays dependency-free)
Gravicode.Finance.LLM.Ocr OCR for scanned reports โ€” line detection + TrOCR (HF.Net) and a PDF loader for filings Q&A (separate: it carries ImageSharp)
Gravicode.Finance.NewsAnalytics RSS/Atom, finance sentiment lexicon, ticker/entity extraction, event classification, MinHash de-duplication, earnings-call analysis
Gravicode.Finance.Visualization Dependency-free SVG charts (candles, lines, frontier, heatmaps, histograms) and self-contained HTML tearsheets
Gravicode.Finance.GPU GPU Monte Carlo pricing, batch Black-Scholes, Monte Carlo VaR on CUDA / OpenCL / CPU (ILGPU), ROCm (HIP), Vulkan and Direct3D 12
Gravicode.Finance.RustBridge Rust finance_native kernels (all 248 catalogue indicators, HRP, VaR, covariance with AVX2/AVX-512, Black-Scholes, Monte Carlo) with an identical managed fallback

Quick start

dotnet add package Gravicode.Finance.Pricing
dotnet add package Gravicode.Finance.Risk
dotnet add package Gravicode.Finance.Portfolio
dotnet add package Gravicode.Finance.Backtesting
dotnet add package Gravicode.Finance.TimeSeries
using Finance.Core.Market;
using Finance.Pricing.Options;
using Finance.Risk;
using Finance.TimeSeries.Indicators;
using Finance.Backtesting;
using Finance.Backtesting.Strategies;

// Offline, reproducible data (swap in YahooFinanceProvider / BinanceProvider for live data).
Bar[] bars = SyntheticMarket.GeometricBrownianBars(1000, startPrice: 100, annualDrift: 0.08, annualVolatility: 0.25);
double[] close = bars.Select(b => b.Close).ToArray();

// Indicators
double[] rsi = Ta.Rsi(close, 14);
var bands = Ta.Bollinger(close, 20, 2);

// Options
var g = BlackScholes.Greeks(OptionType.Call, spot: 100, strike: 105, time: 0.5, rate: 0.04, dividendYield: 0.01, volatility: 0.25);
Console.WriteLine($"Call {g.Price:F4}  ฮ” {g.Delta:F4}  ฮ“ {g.Gamma:F5}  vega/pt {g.VegaPerPoint:F4}");

// Risk
double[] returns = close.Zip(close.Skip(1), (a, b) => b / a - 1).ToArray();
var var99 = ValueAtRisk.Historical(returns, 0.99);
Console.WriteLine($"1-day VaR 99%: {var99.ValueAtRisk:P2}, ES: {var99.ExpectedShortfall:P2}");

// Backtest
var result = new BacktestEngine().Run(new SmaCrossoverStrategy(20, 50, "DEMO"), "DEMO", bars);
Console.WriteLine(result.Statistics);

More: docs/en/getting-started.md, the console tour in samples/Finance.Quickstart and 15 notebooks.

An Avalonia desktop app with eleven live modules (dotnet run --project samples/Finance.Gallery).

Live market Live Market Dashboard โ€” Binance watchlist, 1-minute candles, EMA/RSI Order book Order Book Viewer โ€” L2 ladder, depth, imbalance, sweep cost
Indicators Indicator Explorer โ€” the whole 248-entry catalogue, live parameters Portfolio Portfolio Optimizer โ€” 10 methods, frontier, risk contributions
VaR VaR Explorer โ€” five VaR methods, backtests, stress, Monte Carlo fan Greeks Greeks Explorer โ€” BSM vs trees vs Monte Carlo
Strategy builder Strategy Builder โ€” no-code rules โ†’ backtest โ†’ generated C# Backtesting Backtesting Studio โ€” built-in strategies, costs, walk-forward
AI assistant AI Financial Assistant โ€” tool-calling LLM over Finance.Net functions News News Intelligence โ€” live RSS, sentiment, events
Social Social Sentiment โ€” mentions, engagement-weighted sentiment, buzz

Screenshots are regenerated headlessly with dotnet run --project samples/Finance.Gallery -- --screenshot docs/screenshots.

Performance

Measured with dotnet run -c Release --project benchmarks/Finance.Benchmarks -- --quick on a 4-core 15 W laptop (Intel UHD 620 over OpenCL for the GPU column), best of 7 alternating runs:

Case Managed Rust GPU
RSI(14), 1M prices 11.3 ms 8.9 ms โ€“
Black-Scholes + Greeks, 1M options 100.6 ms 103.1 ms 85.0 ms
MC European, 4M paths 54.3 ms 41.7 ms 19.6 ms
Historical VaR 99%, 1M returns 14.1 ms 5.4 ms โ€“
MC portfolio VaR, 10 assets ร— 200k 131 ms โ€“ 54.5 ms

Full table and caveats: docs/en/benchmarks.md.

Building from source

dotnet build FinanceNet.slnx                 # also runs `cargo build --release` for the Rust kernels if cargo is installed
dotnet build FinanceNet.slnx -p:SkipRustBuild=true   # managed-only build
dotnet test FinanceNet.slnx
dotnet pack -c Release                       # โ†’ artifacts/packages

Requirements: .NET 10 SDK; optional Rust 1.80+ for native kernels; optional CUDA/OpenCL driver for GPU.

Honest limitations

  • The native ROCm/HIP backend has not been run on AMD hardware (none available during development); its kernel source was checked on the host. The DirectML backend runs Direct3D 12 compute shaders, not DirectML operators.
  • Historical stress scenarios use stylised, rounded shocks for illustration, not regulatory use.
  • Hosted FinBERT needs Hugging Face Inference credits; Gravicode.Finance.LLM.Local runs FinBERT in-process instead.
  • Reddit's unauthenticated API is often rate-limited; the Gallery falls back to labelled synthetic posts.

Project files

License

MIT ยฉ Gravicode Studios โ€” Dibuat oleh Gravicode Studios dipimpin oleh Kang Fadhil.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.10.0 79 10/12/2026
0.9.0 78 10/12/2026
0.8.0 80 10/12/2026
0.7.0 78 10/12/2026
0.6.0 85 10/11/2026
0.5.0 73 10/11/2026
0.4.0 72 10/11/2026
0.3.0 76 10/11/2026
0.2.0 78 10/11/2026