Skip to main content
Skip table of contents

How to use PNL analysis notebook

KB: 0017

Open PNL analysis notebook via Colab notebook

  1. Open google colab: https://colab.research.google.com/, then select File->Open notebook.



  2. Select Github, put https://github.com/CoinAlpha/pnl-analysis on Github URL, and select the main branch. Then click the performance.ipynb to open the notebook.





Running the PNL analysis notebook via Colab notebook

  1. After loading the notebook on colab notebook select Runtime ->Run all



  2. Input your trading pair, read-only API, and secret key, start date, and end date. Then click start.



Open PNL analysis notebook via local Jupyter Lab (windows)

  1. Install Git for Windows

  2. Open Git bash

  3. Clone the repo from https://github.com/CoinAlpha/pnl-analysis
    git clone https://github.com/CoinAlpha/pnl-analysis.git
  4. Run the following command
    cd  pnl-analysis
    conda create --name pnl python=3.8
    conda activate pnl
    pip install -r requirements.txt
    conda install pywin32
    jupyter lab


  5.  Select the performance.ipynb on the file list on the left

 

Open PNL analysis notebook via local Jupyter Lab (Mac)

  1. Open new terminal

  2. Clone the repo from https://github.com/CoinAlpha/pnl-analysis
    git clone https://github.com/CoinAlpha/pnl-analysis.git
  3. Run the following command
    cd pnl-analysis
    conda create --name pnl python=3.8
    conda activate pnl
    pip install -r requirements.txt
    jupyter lab


  4. Select the performance.ipynb on the file list on the left



Running the PNL analysis notebook via local Jupyter Lab

  1. After opening the notebook on Jupyter lab select Run ->Run all cells



  2. Input your trading pair, read-only API, and secret key, start date, and end date. Then click start



  3. Click the log output to view the result




Info

For AscendEX, you can get the API group number on your API settings

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.