html_report/
html_report.rs

1mod common;
2
3use quantstats_rs::{HtmlReportOptions, html};
4
5fn main() -> Result<(), Box<dyn std::error::Error>> {
6    // Use shared demo data from examples/common.rs (generated from data file)
7    let series = common::demo_strategy();
8
9    let options = HtmlReportOptions::default()
10        .with_title("Quantstats-rs Demo Tearsheet")
11        .with_strategy_title("Demo Strategy")
12        .with_output("tearsheet.html");
13
14    let html = html(&series, options)?;
15
16    println!(
17        "Generated HTML report ({} bytes) at tearsheet.html",
18        html.len()
19    );
20
21    Ok(())
22}