- Get complete price data (Region, SettlementDate, Price, ?Demand)
- Given API call with (ConnectionDate, Region, Capacity, TotalCost):
- Compute N = number of periods per day at full (dis)charge
- For each day since ConnectionDate, find N top and bottom priced periods
- Compute difference between top and bottom for revenue per day
- Select top revenue, bottom revenue, summer and winter days (4 Intradays)
- Compute cumulative revenue per day and compare to TotalCost for payback day
- Return 4 Intradays, cumulative revenue, payback day and some averages
- Populate About tab with stats/averages
- Populate Intraday tab with 4 intraday graphs, Revenue tab with cumulative revenue graph
TODO:
- Account for cost of debt
- Account for min/max charge and battery degradation
- Use day-ahead projections rather than perfect foresight
- Account for bid stack rather than clearing price