Quick Start¶
This guide walks through three core operations: downloading ISO market data, computing trading metrics, and launching the interactive dashboard.
Prerequisites
Make sure you have completed the Installation and Configuration steps before proceeding.
Step 1 -- Download ISO Data¶
Download raw day-ahead LMP data from MISO for a date range:
from progridpy.iso import MISO, MISORawDataType
miso = MISO()
miso.download_raw_data(
start_date="2024-01-01",
end_date="2024-01-31",
data_types=[MISORawDataType.DAY_AHEAD_EXANTE_PRICE],
)
The same pattern applies to every supported ISO:
ERCOT credentials
ERCOT downloads require API credentials. See Configuration for the required environment variables.
Step 2 -- Compute Metrics¶
Given a DataFrame of trade results (trade_df), compute the full suite of risk, return,
ratio, drawdown, and streak metrics:
from progridpy.metrics import MetricsEngine
engine = MetricsEngine(iso_name="MISO", df_iso=trade_df)
result = engine.compute()
print(f"Sharpe Ratio: {engine.sharpe_overall:.2f}")
print(f"Max Drawdown: ${engine.max_drawdown:,.2f}")
print(f"Win Rate: {engine.win_rate_pct:.1f}%")
Export the computed metrics to CSV:
Step 3 -- Launch the Dashboard¶
Render an interactive Streamlit dashboard with KPI cards, performance charts, heatmaps, and distribution plots:
from progridpy.metrics import MetricsEngine, StreamlitDashboard
engine = MetricsEngine(iso_name="MISO", df_iso=trade_df)
dashboard = StreamlitDashboard(engine=engine)
dashboard.render()
Or export a standalone HTML report:
The dashboard can also be launched from the command line via the helper scripts:
Next Steps¶
- Review the full Configuration reference for all environment variables.
- See Project Structure for an architectural overview of the codebase.