How tecnom1k3/swensen-calculator works
• .env file → Main Controller
• Configuration parameters (funds, tickers, API key, etc.)
• Main Controller → Market Price Service
• Market Price Service → Alpha Vantage API
• Market Price Service → Cache Layer (bidirectional)
• Step-by-step calculation process
• Fund allocation
• Share calculation
• Investment summary generation
Specific Elements
a. Configuration Section
• Category funds (DME, FRE, EME, TRE, TBI, PEQ)
• Ticker mappings
• API configuration
• Cache settings
b. Processing Pipeline
• Market price retrieval
• Price adjustment calculation
• Share allocation
• Investment summary generation
c. Output Generation
• Funds summary
• Category details
• Investment calculations
• Warning/Error handling
Key Aspects to Highlight
• Cache mechanism for market prices
• Error handling paths
• Configuration validation
• Category processing logic
• Price adjustment calculations
Technical Details
• Python 3.9+ requirement
• External dependencies (from requirements.txt)
• Cache TTL setting
• Price increase ratio logic
[Configuration Layer]
• ↓
[Input Processing Layer]
• ↓
[Market Data Layer]
• ↓
[Calculation Layer]
• ↓
[Output Generation Layer]