How to use PNL analysis notebook
KB: 0017
Open PNL analysis notebook via Colab notebook
-
Open google colab: https://colab.research.google.com/, then select File->Open notebook.
-
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
- After loading the notebook on colab notebook select Runtime ->Run all
-
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)
-
Install Git for Windows
- Open Git bash
-
Clone the repo from https://github.com/CoinAlpha/pnl-analysis
git clone https://github.com/CoinAlpha/pnl-analysis.git
-
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
- Select the performance.ipynb on the file list on the left
Open PNL analysis notebook via local Jupyter Lab (Mac)
- Open new terminal
-
Clone the repo from https://github.com/CoinAlpha/pnl-analysis
git clone https://github.com/CoinAlpha/pnl-analysis.git
-
Run the following command
cd pnl-analysis
conda create --name pnl python=3.8
conda activate pnl
pip install -r requirements.txt
jupyter lab
- Select the performance.ipynb on the file list on the left
Running the PNL analysis notebook via local Jupyter Lab
- After opening the notebook on Jupyter lab select Run ->Run all cells
-
Input your trading pair, read-only API, and secret key, start date, and end date. Then click start
-
Click the log output to view the result
Info
For AscendEX, you can get the API group number on your API settings