Financial Analytics Powered by Rust
Finalytics is a high-performance Rust library for security analysis and portfolio optimization, with bindings for Python, Node.js and Go.
use std::error::Error;
use finalytics::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let ticker = Ticker::builder()
.ticker("AAPL")
.start_date("2023-01-01")
.end_date("2024-12-31")
.interval(Interval::OneDay)
.benchmark_symbol("^GSPC")
.confidence_level(0.95)
.risk_free_rate(0.02)
.build();
ticker.report(Some(ReportType::Performance)).await?.show()?;
Ok(())
}