Skip to content

BYUSilverFund/sf-trading-system

Repository files navigation

Silver Fund Trading System Repository

The all in one repository for researching, backtesting, and trading quantitative trading strategies.

Getting Started

Clone Repository

In your desired folder run:

git clone https://github.com/BYUSilverFund/sf-trading-system.git

Open in vscode

code sf-trading-system

Git Setup

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>

Virtual Environment Setup

The virtual environment will make it so that we have consistent package and Python versions across all of our devices running the repository.

uv Installation (Package Manager)

MacOS/Linux (Supercomputer)

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Check installation

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.

Sync Denpendencies

uv sync

Activate Environment

MacOS/Linux (Supercomputer)

source .venv/bin/activate

Windows

.venv/Scripts/activate

Add Module to Python Path

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.

Install pre-commit

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 .env File

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!

Useful Commands

Add a Dependency

uv add <package>

Remove a Dependency

uv remove <package>

Format Code

pre-commit run --all-files

About

The all in one repository for researching, backtesting, and trading quantitative trading strategies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •