The all in one repository for researching, backtesting, and trading quantitative trading strategies.
In your desired folder run:
git clone https://github.com/BYUSilverFund/sf-trading-system.git
Open in vscode
code sf-trading-system
Configure your git credentials. Otherwise you won't be able to commit any code.
git config --global user.name <username>
git config --global user.email <email>
The virtual environment will make it so that we have consistent package and Python versions across all of our devices running the repository.
MacOS/Linux (Supercomputer)
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
uv --version
If this returns an error you might need to add uv to your path. Run:
source $HOME/.local/bin/env
Restart your terminal for the changes to take effect.
uv sync
MacOS/Linux (Supercomputer)
source .venv/bin/activate
Windows
.venv/Scripts/activate
This step will allow for you to import any module from the project to any other file.
code ~/.bashrc
Add this line to the bottom:
# Custom python path for sf-trading-system project
export PYTHONPATH=/path/to/project/sf-trading-system/:$PYTHONPATH
Make sure to kill all running terminals and reopen for the environment to reset.
pre-commit will clean up any code that you write when you commit it. This helps with formatting consistency across the repository.
pre-commit install
Create a new file in your sf-trading-system
directory called .env
.
In the file add the following line but with your path.
ROOT=/path/to/sf-trading-system
That's it! You are all ready to go with the project!
uv add <package>
uv remove <package>
pre-commit run --all-files