Sign inSign up

btnguyen2k/alphalab

By btnguyen2k

•Updated about 1 month ago

AI-powered market research lab.

Image
Machine learning & AI
0

10K+

btnguyen2k/alphalab repository overview

AI-powered market research lab.

GitHub Repo: https://github.com/Bits4Bites/alphalab⁠

⁠✨Features

  • Analyze Ticker Perform AI-driven analysis for individual stocks or ETFs using market data, technical signals, macro context, and sentiment insights.
  • Build Portfolio Generate a portfolio from scratch based on investor goals, risk tolerance, time horizon, market preference, and investment themes.
  • Review Portfolio Review an existing portfolio and identify strengths, weaknesses, concentration risks, and optimization opportunities.
  • Freestyle Mode Interact with the AI freely using natural language prompts for custom market research and investment exploration.

⁠🚀 Getting Started

⁠Run from Docker Image
docker run -p 8000:8000 \
  --env-file app_settings.env \
  --env-file sec_settings.env \
  --env-file external_identity_providers.env \
  --env-file ai_vendors.env \
  --env-file ai_tasks.env \
  btnguyen2k/alphalab:release

The app will be available at http://localhost:8000.

⁠Environment Variables

Pre-set configurations are loaded from .env files. All pre-set values can be overridden with environment variables.

FilePurpose
app_settings.envApp name, debug mode, base URL, primary markets
sec_settings.envSecret key, JWT settings, allowed emails
external_identity_providers.envOAuth client IDs/secrets (GitHub, LinkedIn)
ai_vendors.envAI vendor endpoints, API keys, models
ai_tasks.envAI task-to-vendor/tier/model mapping
datastore.envRedis connection and key prefix

Required configurations:

VariableDescription
AL_ALLOWED_EMAILSComma-separated list of email addresses allowed to log in
AL_GITHUB_CLIENT_ID / AL_GITHUB_CLIENT_SECRETGitHub OAuth credentials
AL_LINKEDIN_CLIENT_ID / AL_LINKEDIN_CLIENT_SECRETLinkedIn OAuth credentials
AL_LLM__<VENDOR>__<TIER>__ENDPOINTAI vendor endpoint
AL_LLM__<VENDOR>__<TIER>__API_KEYAI vendor API key

At least one identity provider (GitHub or LinkedIn) and one AI vendor must be configured for the app to function properly.

Supported AI vendors:

Vendor<VENDOR> valueNotes
Google GeminiGEMINIUses Google GenAI SDK
OpenAIOPENAINative OpenAI API
Azure OpenAIAZURE_OPENAIUse OpenAI API, support Azure AD credentials
OpenRouterOPENROUTEROpenAI-compatible, supports web search plugin

Pricing tiers (<TIER>): FREE, LOWCOST, PREMIUM (or any custom tier name)

Optional configurations:

VariableDefaultDescription
AL_DEBUGfalseEnable debug mode
AL_BASE_URLhttp://localhost:8000Base URL for OAuth callbacks
AL_PRIMARY_MARKETS(empty)Comma-separated list of primary markets (e.g. US,ASX,LSE)
AL_SECRET_KEYchange-me-in-productionJWT signing secret
AL_JWT_ALGORITHMHS256JWT algorithm
AL_JWT_EXPIRE_MINUTES10080 (7 days)JWT token expiry
AL_LLM__<VENDOR>__<TIER>__MODELS(empty)Comma-separated list of available models
AL_TASK__<TASK>__VENDOR(empty)AI vendor for a specific task
AL_TASK__<TASK>__TIER(empty)AI tier for a specific task
AL_TASK__<TASK>__MODEL(empty)Model for a specific task
AL_DATASTORE_REDIS_URLredis://localhost:6379/0Redis connection URL (enables dashboard market news & AI ideas)
AL_DATASTORE_REDIS_KEY_PREFIXalphalab:Key namespace prefix for all Redis keys

Examples:

# sec_settings.env
AL_SECRET_KEY=your-secret-key
[email protected],[email protected]

# external_identity_providers.env
AL_GITHUB_CLIENT_ID=your-github-client-id
AL_GITHUB_CLIENT_SECRET=your-github-client-secret

# ai_vendors.env (nested with __)
AL_LLM__OPENAI__PREMIUM__ENDPOINT=https://api.openai.com/v1
AL_LLM__OPENAI__PREMIUM__API_KEY=sk-...
AL_LLM__OPENAI__PREMIUM__MODELS=gpt-4o,gpt-4o-mini

# ai_tasks.env (nested with __)
AL_TASK__DASHBOARD_BUILD_PROMPT__VENDOR=openai
AL_TASK__DASHBOARD_BUILD_PROMPT__TIER=premium
AL_TASK__DASHBOARD_BUILD_PROMPT__MODEL=gpt-4o-mini

Tag summary

Content type

Image

Digest

sha256:4ddf642b1…

Size

225.5 MB

Last updated

about 1 month ago

docker pull btnguyen2k/alphalab:3689c17ebf734865bce175573f0cbdab15096e13