
Turtle Quant 1¶
All hail the turt. Modular technical-indicator strategies, parallel backtesting and one-click cloud deployment — built for systematic trading.
Technical indicators¶
A widely varied collection of modular, hand-selected momentum and candlestick pattern indicators that provide early detection of changes in the direction of price trends.
Support / resistance¶
Support and resistance algorithms combined through a fair voting mechanism for high accuracy and confidence.
Parallelisation¶
Multiprocessing and multithreading run strategy calculations in parallel, increasing throughput.
Memoization¶
Thread-safe, file-based caches for expensive indicator calculations speed up backtesting and live predictions.
Cloud orchestration¶
Google Cloud Run Jobs execute long-running tasks in parallel for better throughput and responsiveness.
DevOps¶
A one-click push-to-main CI/CD pipeline builds and deploys Docker images and Cloud Run Jobs with GitHub Actions and Terraform.
Software design¶
Loosely-coupled, cohesive classes with plug-and-play multi-vendor support (e.g. Yahoo Finance, Alpha Vantage).
Get started with development¶
- Clone the repository.
-
Verify that you have a compatible Python version installed on your machine.
-
Install uv (used as the package manager for this project).
-
Install the development dependencies.
Get started with Jupyter notebooks¶
-
Once the above setup is complete, set up a Python kernel.
-
Refer to the following common commands.
-
Start the Jupyter server.
Common entry points¶
Backtesting¶
Run the following script to run all custom backtesting test cases.
Hyperparameter tuning¶
Run the following script to run hyperparameter tuning across all strategies.
Deployment¶
For naming conventions, refer to https://stepan.wtf/cloud-naming-convention/.
Continuous deployment¶
Deployment is fully automated and handled by GitHub Actions. Refer to:
- .github/workflows/main-deploy.yaml
- .github/workflows/main-docs.yaml
- .github/workflows/dev-test.yaml
Google Cloud administration¶
Setting IAM permissions and roles¶
export GOOGLE_CLOUD_PROJECT=$(gcloud config get-value core/project)
gcloud iam service-accounts create svc-usea1-tf
gcloud iam service-accounts keys create ~/key.json --iam-account svc-usea1-tf@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com
gcloud projects add-iam-policy-binding ${GOOGLE_CLOUD_PROJECT} --member "serviceAccount:svc-usea1-tf@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com" --role "roles/bigquery.user"
gcloud projects get-iam-policy $GOOGLE_CLOUD_PROJECT