Skip to content

Spp trading sop

SPP TRADES SOP

SPP Data Download and Processing

  1. The Adjusted Gain based MoM Strategy on SPP requires on the historical DA and RT price data from the past 365 days.

  2. The DA LMP prices from SPP are available in daily files from 2024 onwards which have hourly DA LMP prices for every Settlement Location (or Nodes, different from PNODES). For years 2023 and earlier, annual zip files are available. Both types are handled by ProgridPy library. [NOTE: This may need to update if SPP archives the 2024 data]

  3. The RT LMP prices from SPP are available in daily files from 2024 and annually zipped files for 2023 and earlier. The prices are presented in 5-minute-intervals. ProgridPy library aggregates those into hourly data.

  4. The RT LMP prices for the most recent week is not available in a single file per day format. They are available in one file per interval. ProGridPy library explicitly processes these and creates "RT Prelim Files".

  5. The processing script in ProgridPy library reads these files and creates one file per day with the DA LMP, RT LMP FINAL and RT LMP PRELIM.

Generating Trades and Submitting

  1. Download the most recent data and process them using the script as follows:

    cd ~/progridpy
    git pull origin main
    conda activate progridpy
    pip install .
    python scripts/spp/sync_trade_data_spp.py
    conda deactivate
    
  2. Once the files are downloaded and processed, run the following script to generate the trades:

    cd ~/progrid-utils
    ISO=SPP python scripts/spp_trading/generate_trades.py -y -od "${tomorrow_date}"
    ISO=SPP PROGRID_ENV=TEST python /home/ubuntu/progrid-utils/scripts/spp_trading/submit_job.py -i "/home/ubuntu/SPP-jobs/SPP-${tomorrow_date}.csv" -y
    

    The generate_trades.py script uses the processed files to generate the bids and offers and saves it to the `SPP-jobs directory.

    The submit_job.py script submits the offers and bids to the SPP API using the playwright library in headless mode. If things are not submitted correctly, turn on the PLAYWRIGHT_DEBUG_MODE flag to view screenshots.

    The SPP Portal has multiple digital certificates and password based logins required.
    

    TODO: Add function to query the SPP Portal to confirm submissions.