💡 Inspiration
Retail investors can ask "Alexa, what is Apple's stock price?" But professional fund managers and institutional risk desks never look at a stock in isolation. They watch yield-curve slope, credit spreads, macro regime shifts (Risk-On / Risk-Off), Value-at-Risk distributions, and what a company is actually worth on its cash flows.
Getting that kind of insight has meant sitting in front of multi-screen trading terminals.
With Alexa+ and the Model Context Protocol (MCP), we asked: What if you could talk to your own institutional Chief Investment Officer while having your morning coffee?
We built MacroPulse for Alexa+: a public MCP server that brings macro-regime analytics, Monte Carlo risk, FOMC stress tests, volatility signals and SEC-filing-based equity research to Alexa+, the Fire TV and the Echo Show, backed by a 14-tab analytics dashboard.
🎬 Demo video: https://youtu.be/2uRGDhmCeO0 🔗 Try It
MCP server (Alexa+ add-on endpoint): https://ma-76bae7709d4340b3ab4733ba644f11e4.ecs.us-east-1.on.aws/mcp
Connect with MCP Inspector (npx @modelcontextprotocol/inspector, transport Streamable HTTP) and run get_morning_brief. No sign-in is needed.
Dashboard: https://hf-macro-dashboard.streamlit.app (open ?ticker=AAPL to jump straight to the Equity Report)
Fire TV app: submitted to the Amazon Appstore for Fire TV and currently in review.
Code: https://github.com/sechan9999/macropulse-alexa-mcp (MIT license)
⚡ What It Does
MacroPulse is one quantitative core with four front ends:
Alexa+ add-on: an MCP server (Streamable HTTP) on AWS with 9 tools Alexa+ can call.
Alexa skill with screens: voice intents that also render APL cards on Fire TV and Echo Show.
Streamlit dashboard: 14 analytical tabs, including a full equity-research pack.
Fire TV companion app: a glanceable 10-foot view, served by the same AWS endpoint.
The 9 MCP tools
Tool - What Alexa+ can answer
get_morning_brief A ~30-second pre-market brief. It covers the last S&P 500 close and day change, the macro regime, the 10Y yield and curve slope, SPY's quant signal, and the latest daily scan's top buy/sell names. It is built to run in an Alexa Routine ("Alexa, good morning").
get_equity_report Equity research on a US stock. It gives a DCF fair value built from SEC EDGAR 10-K filings and bear/base/bull scenarios weighted by the live macro regime. It adds a rule-based rating, stop and target levels with 6-month touch probabilities, and a candlestick/indicator screen.
get_macro_regime Risk-On 🟢 / Neutral 🟡 / Risk-Off 🔴 from a stress score (credit-stress and realized-volatility z-scores), plus the historical win rate in that regime.
get_rates_and_spreads 10-Year Treasury yield, the 10Y–3M curve slope, and a credit-stress reading.
simulate_portfolio_risk A Monte Carlo simulation (up to 10,000 paths) giving VaR and Expected Shortfall (CVaR) at 95% or 99% for any ticker.
simulate_fomc_shock A multi-asset portfolio under four FOMC scenarios: hawkish +50 bp, dovish −50 bp, stagflation/curve inversion, and a liquidity crunch.
check_nvda_danger_zone NVIDIA's composite danger index (RSI extension, ATR, volume surges and block trades, VIX, distance to the 50-day average).
scan_quant_signals Volatility squeeze and breakout detection with a transparent −100…+100 conviction score.
get_expected_returns A 12-month S&P 500 reference estimate, explicitly labelled as a static reference, not a live forecast. The live expanding-window Ridge model runs in the dashboard.
Every tool returns structured JSON plus a short sentence written for speech. When live data can't be fetched, the tool says so instead of guessing.
🗣️ Example Alexa+ prompts
The responses below use the tools' real speech templates. Numbers vary with the market.
"Alexa, ask MacroPulse for my morning brief." "Here is your MacroPulse market brief as of the Tuesday, September 22 close. The S&P 500 closed at 7,765, up 0.4 percent. The market regime is Risk-On, with a stress score of −1.48. The 10-year Treasury yields 4.97 percent… The latest daily scan favors QQQ, NVDA and SPY on the buy side, and JPM, TLT and BAC on the sell side. This is information, not investment advice."
"Alexa, ask MacroPulse to give me an equity report on Apple." (This is a real run on September 22 data.) "Apple Inc., ticker AAPL, trades at 338.98 dollars. The probability-weighted fair value is 111 dollars, 67 percent below the price, with the Risk-On regime weighting the scenarios… The rule-based rating is Neutral. The full Excel, Word and dashboard report is in the MacroPulse Equity Report tab."
"Alexa, run a 99% risk simulation on SPY over the next 30 days." "Running a 10,000-path Monte Carlo simulation on SPY over 30 trading days: at the 99% confidence level, your Value-at-Risk is … Expected Shortfall, or CVaR, is …"
"Alexa, show the NVDA Danger Zone on the TV." This renders an APL card on the Fire TV.
📑 The Equity Report (dashboard + voice)
Type a ticker, or open ?ticker=GOOGL, and you get four in-memory downloads:
an Excel DCF model with live formulas: change the yellow assumption cells and everything recalculates; a Word research note; an offline HTML dashboard; a zip of all of the above.
What's inside:
The valuation is an FCFF-proxy DCF from SEC XBRL facts, using CAPM with the live 10Y yield and a Blume-adjusted beta. A WACC × g sensitivity grid carries the dashboard's FOMC shock scenarios overlaid on it. P/E and P/B bands and a football-field chart show the valuation range. Target touch probabilities use the drift implied by the dashboard's Ridge S&P 500 forecast. Monthly, weekly and daily candlestick charts carry KD, MACD and pattern markers.
🛠️ How We Built It
Quantitative core (Python)
pandas, NumPy, SciPy, scikit-learn. The models are an expanding-window Ridge regression, a Gaussian Mixture regime model in the dashboard, Monte Carlo VaR/CVaR, DCF and technical indicators.
Data: yfinance prices, FRED credit spreads and curve (when a key is set), and SEC EDGAR XBRL company facts. The EDGAR parsing handles restatements, multi-class share counts and filing-date-based EPS with no look-ahead. The data lake is on AWS S3. AI narratives use Google Gemini or Amazon Bedrock, which may quote only numbers present in the JSON they're given.
MCP server
The official Python MCP SDK (FastMCP) on Starlette. It serves stateless Streamable HTTP at /mcp (and at the base URL) plus legacy SSE. A TTL price cache with background refresh and a start-up warm-up keeps requests off Yahoo's latency. It runs as a container on Amazon ECS Express Mode behind HTTPS. The same service serves /privacy, /terms, /health and the Fire TV app's /api/*.
Alexa and screens
An ASK interaction model and webhook; APL 2024.1 documents for the Fire TV and Echo Show; an Alexa+ add-on manifest pointing at the MCP endpoint.
A Streamlit dashboard on Streamlit Community Cloud. A GitHub Action mirrors every merge into the deploy repo.
A Fire TV app built with Expo + react-native-tvos and packaged as an APK with EAS Build. It was tested on an Android TV (API 30) emulator, which matches Fire OS 8, and then submitted to the Amazon Appstore.
🧗 Challenges We Ran Into
Alexa+'s latency budget vs. market-data latency. Alexa+ expects answers in under 500 ms, and a cold Yahoo fetch can take seconds. We serve every tool from a TTL cache that refreshes in the background and warms up at start-up.
Measured with a warm cache: get_macro_regime ≈ 30 ms, a 10,000-path Monte Carlo ≈ 11 ms, the full morning brief ≈ 56 ms.
These were measured in our dev container on synthetic prices, not on the production endpoint.
Never making numbers up. A data outage returns an honest spoken error, not a guess.
We found and removed a fallback that served a synthetic demo frame as if it were live data.
The equity report refuses ETFs and 20-F/40-F filers rather than running a DCF on mismatched currencies.
Messy SEC XBRL data. Tag names change over the years, restatements supersede earlier values, debt is split across several tags, and share classes must be summed.
Keeping the Excel model honest. Tests recalculate the generated workbook in LibreOffice and check it matches the Python engine to 1e-6.
Data integrity under concurrency. yf.download keeps its results in shared global state, and concurrent sessions produced impossible peer returns (+1,400%). We switched to per-ticker fetches and added a plausibility guard that excludes and names corrupted series. We also fixed bar labels that dated the current month in the future.
10-foot UI details on Fire TV. Testing on the emulator found two bugs a phone never shows. The permanent nav rail was drawn over the content and clipped the left edge of every screen. react-native-tvos also fades a focused row to 20% opacity by default, so the selected item looked disabled. The rail fix is in the submitted build; the focus fix (an orange outline instead of fading) ships in the next update. Voice ergonomics. Charts don't read aloud well. Each tool returns metrics plus a TTS-friendly sentence: "normally sloped" instead of "steep / normal", "strong buy" instead of "STRONG_BUY".
🏆 Accomplishments That We're Proud Of
9 MCP tools live on AWS behind one HTTPS endpoint that also feeds a Fire TV app, now submitted to the Amazon Appstore.
An institutional research pack from one ticker: a regime-weighted DCF from primary SEC filings, delivered as an Excel model with live formulas, a Word note and an HTML dashboard, and summarized by voice.
A morning brief that runs as an Alexa Routine.
137 offline automated tests. They cover MCP transport, the EDGAR parser edge cases, DCF math, the Excel recalculation, Streamlit AppTest runs of the dashboard, and voice routing.
A "no fabricated numbers" rule enforced in code, not just in the disclaimer.
📺 The Fire TV app is live on the Amazon Appstore: https://www.amazon.com/gp/product/B0HKWHFJSS (v1.0.2, passed Amazon's content-policy and functionality validation).
📚 What We Learned
How to design agent tools an LLM can choose between reliably: narrow purpose, typed parameters, structured output plus one spoken sentence.
Stateless Streamable HTTP makes an MCP server easy to scale behind a load balancer.
Voice is best for the headline and screens are best for the detail. The same tool result can drive both a spoken answer and a Fire TV card.
In finance, being honest about missing data matters more than always having an answer.
🚀 What's Next for MacroPulse
Proactive notifications: an Echo ring when the regime flips to Risk-Off or NVDA enters its Danger Zone.
Personal watchlists and portfolios through account linking. Read-only brokerage connectors (Alpaca, IBKR, Plaid schema) already exist in the dashboard.
Echo Show widgets with the regime at a glance, and the Fire TV app live on the Amazon Appstore (submitted, in review), followed by the 1.0.2 update.
One regime definition everywhere: aligning the dashboard (FRED spreads) and the voice/TV API (market-based proxy), which can currently disagree.
*MacroPulse is informational only and is not investment advice.
Built With
- alexa-skills-kit
- amazon-alexa
- amazon-bedrock
- amazon-ecr
- amazon-ecs
- amazon-web-services
- apl
- eas-build
- expo.io
- fastmcp
- fire-tv
- fred-api
- mcp
- numpy
- openpyxl
- pandas
- plotly
- python
- react-native
- scikit-learn
- scipy
- starlette
- streamlit
- typescript
- yfinance
Log in or sign up for Devpost to join the conversation.