GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Rohan5commit/trading_bot: Daily Trading Bot with GitHub Actions

BranchesTags
Open more actions menu

Latest commit

 

History

488 Commits
488 Commits

Folders and files

NameName
Last commit message
Last commit date
.agents
.agents
 
 
.github/workflows
.github/workflows
 
 
analysis/stress_tests/2026-02-27_09-48-06Z
analysis/stress_tests/2026-02-27_09-48-06Z
 
 
backtesting
backtesting
 
 
lightning_inference_bundle
lightning_inference_bundle
 
 
models
models
 
 
quant_platform
quant_platform
 
 
state
state
 
 
tests
tests
 
 
universe
universe
 
 
.DS_Store
.DS_Store
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
.lightningignore
.lightningignore
 
 
README.md
README.md
 
 
RUNBOOK.md
RUNBOOK.md
 
 
ai_manager_memory.py
ai_manager_memory.py
 
 
api_keys.py
api_keys.py
 
 
backtesting_runner.py
backtesting_runner.py
 
 
bootstrap_sp500_models.py
bootstrap_sp500_models.py
 
 
broker.py
broker.py
 
 
cleanup_cache.sh
cleanup_cache.sh
 
 
config.yaml
config.yaml
 
 
deploy_lightning_inference.py
deploy_lightning_inference.py
 
 
deploy_modal_inference.py
deploy_modal_inference.py
 
 
distilled_trade_client.py
distilled_trade_client.py
 
 
email_notifier.py
email_notifier.py
 
 
ensure_lightning_inference_cloudspace.py
ensure_lightning_inference_cloudspace.py
 
 
features.py
features.py
 
 
ingest_news.py
ingest_news.py
 
 
ingest_prices.py
ingest_prices.py
 
 
launch_lightning_inference_app.py
launch_lightning_inference_app.py
 
 
launch_lightning_inference_studio.py
launch_lightning_inference_studio.py
 
 
lightning_trained_model_app.py
lightning_trained_model_app.py
 
 
llm_sentiment.py
llm_sentiment.py
 
 
llm_trader.py
llm_trader.py
 
 
main.py
main.py
 
 
migrate_to_alpaca.py
migrate_to_alpaca.py
 
 
model_registry.json
model_registry.json
 
 
portfolio.py
portfolio.py
 
 
positions.py
positions.py
 
 
requirements-lightning-inference.txt
requirements-lightning-inference.txt
 
 
requirements.txt
requirements.txt
 
 
reset_performance.py
reset_performance.py
 
 
run_ai_daily_modal.py
run_ai_daily_modal.py
 
 
run_ai_trading_smoke.py
run_ai_trading_smoke.py
 
 
run_ai_trading_smoke_studio.py
run_ai_trading_smoke_studio.py
 
 
run_daily_job_lightning_studio.py
run_daily_job_lightning_studio.py
 
 
send_email_report.py
send_email_report.py
 
 
send_failure_report.py
send_failure_report.py
 
 
state_recovery.py
state_recovery.py
 
 
stop_lightning_inference_app.py
stop_lightning_inference_app.py
 
 
stop_lightning_inference_studio.py
stop_lightning_inference_studio.py
 
 
storage_policy.py
storage_policy.py
 
 
trained_model_client.py
trained_model_client.py
 
 
trained_model_service_runtime.py
trained_model_service_runtime.py
 
 
universe_builder.py
universe_builder.py
 
 
utils.py
utils.py
 
 
verify_trades.py
verify_trades.py
 
 
wait_for_trained_model.py
wait_for_trained_model.py
 
 
warm_trained_model.py
warm_trained_model.py
 
 

Repository files navigation

Trading Bot

This repo now contains both parts of the system in one place:

  1. The daily trading bot at the repo root
  2. The train-once quant model platform under quant_platform/

Repo Layout

  • Root: live trading bot, daily orchestration, SQLite state, email/reporting
  • quant_platform/: corpus building, one-time GPU training, frozen LoRA adapter workflow, backtesting/research platform

Current Architecture

trading_bot/
├── main.py                      # Daily core bot + AI bot orchestration
├── llm_trader.py                # AI trading branch using the trained model
├── trained_model_client.py      # Remote HTTP client for trained-model inference
├── trained_model_service_runtime.py
├── lightning_trained_model_app.py
├── deploy_lightning_inference.py
├── backtesting/                 # Existing research stack in the bot repo
└── quant_platform/              # Merged train-once quant platform repo

Core vs AI

  • Core bot remains unchanged in principle: price ingestion, feature generation, OLS ranking, meta-learner, portfolio logic
  • AI trading bot is separate and now prefers the trained quant model over HTTP when Lightning full-runtime is available
  • If the full runtime is unavailable or unaffordable, the AI path falls back to a deterministic local distilled manager that reuses the AI memory journal

Secrets

Still used

  • TRAINED_MODEL_INFERENCE_URL: deployed inference URL for the AI trading bot
  • TRAINED_MODEL_API_KEY: optional auth for the trained-model endpoint
  • TWELVEDATA_API_KEYS, ALPHAVANTAGE_API_KEYS: optional price providers

No longer used by the AI trading bot

  • MODAL_TOKEN_ID
  • MODAL_TOKEN_SECRET

Main Workflows

  • .github/workflows/daily_trading_bot.yml
    • Daily root bot workflow
    • Core + AI orchestration
  • .github/workflows/ai_trading_smoke.yml
    • AI-only smoke test against the trained-model path
    • Does not run the core strategy
  • .github/workflows/deploy_lightning_inference.yml
    • Deploys the trained-model inference service to Lightning AI
    • Leaves the core bot untouched

AI-Only Smoke Test

Manual:

python run_ai_trading_smoke.py

GitHub Actions:

  • Actions -> AI Trading Smoke
  • This tests only the AI trading branch and the trained-model endpoint

Quant Platform

The full train-once quant platform has been merged into:

  • quant_platform/

That subtree contains:

  • corpus builders
  • training scripts
  • backtest engine
  • inference/API scaffolding
  • configs, docs, and tests from the original train-once repo

Start there if you want to inspect the model/training system rather than the daily bot.

Local Setup

pip install -r requirements.txt
python main.py daily_job

For AI-only testing:

python run_ai_trading_smoke.py

Notes

  • The AI bot is not remote-only anymore:
    • preferred path: Lightning-hosted trained-model inference
    • fallback path: local distilled manager with shared AI memory
  • The current preferred deployment target is Lightning AI CPU when project balance allows it.
  • The Lightning inference app can either mount a ready adapter directory or download a tar.gz / .zip archive via TRAINED_MODEL_ADAPTER_ARCHIVE_URL.
  • The core bot and AI bot remain logically separate even though they now live in one combined repo.

Lightning Account

  • The funded Lightning deployment account for this repo is Rohan San
  • Username: rohansanthoshkumar1
  • Email: [email protected]
  • The repo should use the GitHub secrets LIGHTNING_USERNAME, LIGHTNING_API_KEY, and LIGHTNING_USER_ID for that account
  • Do not switch deployment to the separate rohansanthoshkumar account unless explicitly told to do so

About

Daily Trading Bot with GitHub Actions

Resources

Readme
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.