Variable HeatConst

Heat: HeatUtils

Singleton instance of HeatUtils for convenient heatmap operations.

import { Heat } from "backtest-kit";

// Strategy-specific heatmap
const stats = await Heat.getData("my-strategy");
console.log(`Portfolio PNL: ${stats.portfolioTotalPnl}%`);
console.log(`Total Symbols: ${stats.totalSymbols}`);

// Per-symbol breakdown
stats.symbols.forEach(row => {
console.log(`${row.symbol}:`);
console.log(` Total PNL: ${row.totalPnl}%`);
console.log(` Sharpe Ratio: ${row.sharpeRatio}`);
console.log(` Max Drawdown: ${row.maxDrawdown}%`);
console.log(` Trades: ${row.totalTrades}`);
});

// Generate and save report
await Heat.dump("my-strategy", "./reports");