Skip to content

Framework to run and back-test stock trading strategies in the market

Notifications You must be signed in to change notification settings

jzaturensky/stock-trade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock-Trader

Python

  • Use Python 3.7 or above (virtual environment recommended)
    • python3 -m venv .venv
    • source .venv/bin/activate
  • Install requirements: pip install -r requirements.txt
  • Run ./trader.py --help for CLI format
    • E.g. ./trader.py --brokerage dry_run --strategy vansh -d
    • E.g. ./trader.py --brokerage dry_run --strategy vansh -e on_market_open
  • Add any credentials to the config directory

Setting up Alpaca Brokerage

To use the Alpaca brokerage (paper money or real money), follow these steps:

  1. Go to https://alpaca.markets/
  2. Create a new account
  3. Generate the Key ID and Secret Key
  4. Go to the /config directory and run touch alpaca.json
  5. Paste your key id and secret in the following format:
{
    "key_id": "<YOUR KEY HERE>",
    "secret_key": "<YOUR SECRET HERE>"
}

About

Framework to run and back-test stock trading strategies in the market

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages