Skip to content

collection of python scripts for fast trading idea testing, wrangling with financial data. etc...

Notifications You must be signed in to change notification settings

madpower2000/finlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FinLab

FinLab is collection of python scripts for fast trading idea testing, wrangling with financial data. etc...

Project setup

Clone GitHub repo

Create virtual environment:

py -m venv venv

Activate virtual environment:

venv\Scripts\activate

Install requirements:

pip install -r requirements.txt

Downloading market data

data.py CLI download and store market data in parquet format. CLI format:

py -m data <ticker> <start_date> <end_date> [<interval>]

Example of usage :

py -m data SPY 2021-01-01 2021-12-31

Download data automatically stored in \data subdirectory.

Use downloaded data in you code:

data = pd.read_parquet(r"..\data\SPY_2021-01-01_2021-12-31_1d.parquet")

Plot market data

Small plot.py do this job with plotly lib.

py -m plot data\SPY_2021-01-01_2021-12-31_1d.parquet

Lab

Script for experiments live in lab folder

The name of the script is 000 index.

to run script:

 py -m 001

AI

Consider to add next sentence to your prompt

< strategy description place here>

Trading Strategy Development & Backtesting

Task:

  1. Develop a trading strategy.
  2. Implement a backtesting script in Python.
  3. Use the Plotly library for data visualization.

Assumptions:

  • Historical market data is already available locally.
  • You can load SPY's daily historical data (from 2021-01-01 to 2021-12-31) using:
data = pd.read_parquet(r"..\data\SPY_2021-01-01_2021-12-31_1d.parquet")

About

collection of python scripts for fast trading idea testing, wrangling with financial data. etc...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages