-
-
Anonymous Demo Mode combines real market data with sample portfolio data, market regime analysis, and risk controls.
-
CRWD shows a strong trend but an extended entry, so Smart System recommends waiting for a pullback.
-
Portfolio summary highlights allocation, concentration, lifecycle status, and positions requiring attention.
-
GPT-5.6 turns privacy-safe portfolio metrics and market conditions into a clear risk explanation.
Individual investors often have important information scattered across brokerage accounts, watchlists, charts, spreadsheets, and transaction files. A stock can look attractive on a chart but still be a poor entry, add too much portfolio concentration, or conflict with the broader market environment.
I created Smart System to bring those decisions together in one disciplined workflow. The goal is not to automate trading. It is to help an investor review market conditions, entry timing, position risk, portfolio concentration, and the final action before making a decision.
Smart System is an AI-assisted portfolio decision-support application built with Python and Streamlit.
It combines:
- Real public-market prices
- Market Mode and broader market-regime analysis
- SPY and QQQ trend conditions
- Watchlist screening and scoring
- Entry-quality checks
- Preferred buy zones and stop levels
- Position-risk calculations
- Portfolio allocation and concentration analysis
- Lifecycle states such as BUILD, HOLD, DEFEND, TRIM, and EXIT
- Portfolio action logging and decision journaling
- Portfolio performance and comparison charts
- A GPT-5.6 Portfolio Risk Explanation
For example, Smart System calculates the percentage of the portfolio represented by its five largest positions:
[ \text{Top 5 Weight} = \frac{\text{Value of the five largest positions}} {\text{Total portfolio value}} \times 100 ]
In the anonymous sample portfolio, the five largest positions represent 67.92% of total value.
The application also separates a good company or trend from a good entry. In the CRWD demonstration, Smart System recognizes a continuation setup but identifies that the price is extended above its 20-day moving average. The final action becomes WAIT FOR PULLBACK instead of chasing the current price.
Smart System was built in Python with Streamlit. The application loads portfolio and watchlist data, retrieves current or latest-close public-market prices, calculates technical indicators and portfolio metrics, and converts those results into structured decision controls.
For Build Week, I created a separate anonymous environment using:
SMART_SYSTEM_DEMO_MODE=1
Demo Mode uses synthetic holdings, quantities, cost basis, transactions, and portfolio balances. It does not load the personal portfolio, journal, watchlist, broker imports, or account information used by the normal application.
Public-market information remains real. Demo Mode retrieves current or latest-close stock prices and calculates actual SPY and QQQ conditions, Market Mode, Regime, and market-gate restrictions.
I also added Explain Portfolio Risk with GPT-5.6.
Smart System first performs all financial calculations itself. When the user presses the button, the application sends a compact privacy-safe payload containing:
Sample ticker symbols
Allocation percentages
Top 5 Weight
Lifecycle states
Market Mode and Regime
SPY and QQQ conditions
Allowed and forbidden setups
Public market-data date
It does not send account numbers, personal balances, share quantities, cost basis, transaction history, computer paths, or API secrets.
GPT-5.6 Luna converts those calculated facts into four plain-English sections:
Overview
Concentration
Market Environment
Suggested Discipline
Codex was used throughout Build Week to inspect the code, diagnose performance problems, implement Demo Mode, integrate GPT-5.6, improve the interface, create tests, and prepare the sanitized submission repository.
Challenges we ran into
Streamlit performance
The biggest technical problem was that almost every interface change caused the entire Streamlit application to rerun. Switching a ticker, changing a chart period, or adjusting a setting could take approximately two minutes.
With Codex, I added performance instrumentation, identified repeated market-data downloads and unnecessary calculations, introduced caching, isolated expensive work, and prevented unrelated sections from recalculating.
Ordinary interactions were reduced from minutes to seconds.
Protecting personal financial data
The original Smart System works with real portfolio and transaction information. That data could not be included in a competition repository or demonstration.
I created separate synthetic files, a strict Demo Mode data boundary, a sanitized repository, and security checks for API keys, personal paths, email addresses, account numbers, and brokerage files.
Stale Demo Mode prices
The first Demo Mode version correctly protected personal data but displayed old saved prices. This made the application appear inaccurate.
I changed the architecture so that private portfolio information remains synthetic while public stock and benchmark data remain current. The interface now displays the latest market date and identifies stale or unavailable data rather than silently presenting it as current.
GPT-5.6 configuration
The initial API integration failed because the API key and model configuration were incomplete.
I added readiness checks for the API key, model availability, SDK status, authentication, billing or quota problems, network errors, and malformed responses. The explanation button is enabled only after a successful connection test.
Interface readability
Some market cards originally truncated important values such as NEUTRAL / BEAR and the forbidden setups. The dashboard was redesigned to make the main market conditions compact, readable, and suitable for a short demonstration video.
Accomplishments that we're proud of
Reduced common Streamlit interactions from approximately two minutes to a few seconds
Created a fully separate anonymous Demo Mode
Preserved real market prices and real market-regime calculations in Demo Mode
Built a working GPT-5.6 portfolio-risk explanation
Limited the GPT payload to privacy-safe sample metrics
Added transparent market timestamps and manual price refresh
Created a clear CRWD example that distinguishes a strong trend from an overextended entry
Added automated privacy, market-data, and behavior tests
Passed 31 unit tests
Validated all 10 sample portfolio tickers and 9 watchlist tickers
Created a sanitized competition repository with no personal financial files or API secrets
What we learned
The most important lesson was that AI works best when it complements deterministic software rather than replacing it.
Smart System calculates prices, allocations, concentration, indicators, and risk using normal application logic. GPT-5.6 is used where a language model adds the most value: translating complex results into clear explanations.
I also learned that privacy should be designed into the application rather than added at the end. The final approach combines:
Synthetic private financial information
Real public-market information
Explicit timestamps
Restricted AI payloads
Environment-based secret handling
A separate sanitized repository
Another lesson was that correctness alone is not enough. A financially correct application can still feel unreliable if it responds slowly, displays stale prices, or truncates its conclusions. Performance and interface clarity are important parts of user trust.
What's next for Smart System — AI Portfolio Decision Support
Future development could include:
More plain-English explanations for individual ticker decisions
Weekly portfolio-risk summaries
Detection of repeated decision-journal mistakes
Improved sector and correlation analysis
Additional broker-import formats
Better mobile responsiveness
More testing of stock splits and other corporate actions
Optional explanations of why a position received BUILD, HOLD, DEFEND, TRIM, or EXIT
Historical comparisons of portfolio concentration and market regime
Smart System will remain a decision-support application rather than an automated trading system. Its purpose is to help investors combine market context, portfolio risk, and disciplined entry rules before taking action.
Decision support only — not personalized financial advice.
Log in or sign up for Devpost to join the conversation.