A trading performance calculator for TradeZero
The app provides users with the following statistics based on their trading data:
- Biggest Percent Win%
- Biggest Percent Loss%
- Win Rate
- Biggest Dollar Win
- Biggest Dollar Loss
- Net Dollar Gain
- Best Weekday
- Worst Weekday
- Profit Factor
To set up the Trading Visualizer web app, follow these steps:
- Clone the repository:
git clone https://github.com/Lomzem/TradingVisu.git
cd TradingVisu
- Create a virtual environment (optional):
python -m venv venv
source venv/bin/activate
- Install required packages:
pip install -r requirements.txt
- Run the development server:
python manage.py runserver
- Access the app: Open your web browser and navigate to
http://127.0.0.1:8000/
- Upload CSV File: Click on the upload button on the page and select your CSV file containing trading data.
- View Statistics: The page will change into a dashboard displays statistics based on your trading data.
- In your TradeZero portal, click Account Overview.
- Click the Trades tab under My Account - Daily Info.
- Choose your desired date range.
- Click on the Excel Icon to export your trading data as a CSV file.
While this app is designed primarily for handling CSV exports from the web portal for TradeZero, it is possible to use other sources for trading data if the CSV has the appropriate columns.
To help get you started, you can download an example CSV file here
In general, the CSV files must have these columns:
T/D
: The date of the transaction.Side
: One of four options:B
,S
,SS
, orBC
for Buy, Sell, Short Sell, and Buy Cover respectively.Symbol
: The stock ticker of the transaction.Qty
: The number of shares in the transaction.Price
: The stock price of the transaction.Exec Time
: The time of the transaction.
- Django: Backend framework for building the web application.
- Pandas: Library for data manipulation and analysis.
- Tailwind CSS: CSS Framework for styling the frontend