Questions score
- Min
- 1
- Median
- 11.0
- Max
- 11
- Q1
- 7.8
- Avg
- 8.9
- Q3
- 11.0
Stock Markets Analytics Zoomcamp 2026
Distribution of scores and reported study time for this homework.
Submissions
72
Median total score
11
Average total score
9
All values are points.
All values are hours reported by students.
Correctness and answer distribution per question.
64 / 72 correct (88.9%)
53 / 72 correct (73.6%)
57 / 72 correct (79.2%)
56 / 72 correct (77.8%)
72 / 72 correct (100.0%)
| Answer | Count |
|---|---|
| Block B (Cross-Sectional Relative Strength) engineers 22 stationary features by evaluating tickers strictly against their same-day peers, resolving the flaw of relying solely on absolute per-ticker metrics: first, it calculates 16 daily percentile ranks (csrank_* and csrank_reg_*) across 8 core metrics (growth_30d/90d/365d, rsi, volatility, natr, ln_volume, and mom) globally across all 33 tickers and regionally within US, EU, and India buckets to measure whether an asset is top-performing on a given date regardless of market regime; second, it computes 6 excess return metrics (excess_snp_* and excess_home_*) across 30-day, 90-day, and 365-day horizons by subtracting benchmark growth (S&P 500 globally, or DAX/EPI regionally) from the stock's growth; because these same-day rankings contain zero lookahead leakage and provide normalized comparative signals, Block B was the only individual block to boost a single decision tree's precision (from 0.5785 to 0.5869) and ROC AUC (from 0.5400 to 0.5467). | 1 |
| N/A | 1 |
| I would add company fundamental and earnings indicators, such as P/E ratio, EPS growth, revenue growth, earnings surprises, and analyst earnings estimates. These variables could help capture changes in a company's financial performance that historical stock prices and technical indicators alone may not fully explain. I would also include market sentiment indicators, such as the VIX, news sentiment, and analyst upgrades/downgrades. Since the dataset contains major stocks from the US, EU, and India, regional market sentiment could also be useful because investors may react differently to economic and geopolitical events across these markets. Possible data sources include Yahoo Finance for company fundamentals and earnings information, FRED for additional US macroeconomic indicators, and official or market-data sources for regional volatility and economic indicators. I would then create lagged versions of these variables and test whether they improve out-of-sample precision for predicting positive 30-day stock growth. | 1 |
| To improve 30-day forward return predictions across US, EU, and Indian equities, I recommend incorporating: 1. Macro & Global Liquidity Indicators: Federal Reserve & ECB balance sheet velocity, Global M2 growth, and currency strength (DXY, USD/INR, EUR/USD) from FRED. 2. Market Sentiment & Volatility: Region-specific implied volatility indices (CBOE VIX, India VIX) and equity Put/Call ratios. 3. Industry & Sector Relative Momentum: Performance relative to sector benchmark ETFs to isolate alpha from broad market macro moves. | 1 |
| - Days to the next earnings announcement, and the last earnings surprise - EURUSD and USDINR growth at 30, 90, and 365 days - US 10-year real yield and breakeven inflation | 1 |
| ### Answer 5 — What data is missing? **Observation from the analysis:** - The decision tree (`clf_best`, depth=4) splits almost entirely on **US macro variables** — `cpi_core_yoy`, `DGS10`, `DGS1`, `FEDFUNDS` — plus commodity/crypto growth features (`growth_wti_oil_365d`, `growth_btc_usd_365d`, `growth_gold_365d`). - The 60 `month_wom` seasonality dummies (Q1) were essentially useless — max correlation only **0.025**. - The dataset covers stocks from **India, the EU, and the US**, but the `MACRO` feature set (`gdppot_us_yoy`, `gdppot_us_qoq`, `cpi_core_yoy`, `cpi_core_mom`, `FEDFUNDS`, `DGS1`, `DGS5`, `DGS10`) is **entirely US-centric**. Non-US stocks are being predicted with no reference to their own domestic monetary or inflation environment. **Proposed new indicators (region-matched macro):** 1. **India** — RBI repo rate, India CPI (combined/core), INR/USD exchange rate, India 10-year G-Sec yield, Nifty 50 index level/growth, India VIX. *Source: RBI's Database on Indian Economy (DBIE), FRED (`INDCPIALLMINMEI`, `INDIRLTLT01STM`), yfinance (`^NSEI`, `INR=X`, `^INDIAVIX`).* 2. **EU** — ECB main refinancing rate, Eurozone HICP (core), EUR/USD, German 10-year Bund yield, EURO STOXX 50 growth, VSTOXX. *Source: ECB Statistical Data Warehouse (SDW), FRED (`CP0000EZ19M086NEST`, `IRLTLT01EZM156N`), yfinance (`^STOXX50E`, `EURUSD=X`, `^V2TX`).* 3. **Ticker-level fundamentals** — P/E, EPS growth, debt/equity, sector/industry classification — so the model can separate macro-driven moves from company-specific ones. *Source: yfinance `.info`/`.financials`, or a fundamentals API (Alpha Vantage, Financial Modeling Prep).* 4. **Cross-market linkage features** — same-day/lagged growth of the *other* two regions' indices (e.g. Nifty's reaction to a US rate move the prior day), to directly model spillover instead of forcing a single US-only macro signal onto all three markets. **Alternative approach:** rather than adding more flat features to the same tree/global-rule framework, train **region-specific models** (or add a `region` categorical + region-interaction terms) so the India/EU/US stocks aren't forced to share one macro regime. | 1 |
| The dataset focuses solely on the U.S. macroeconomy (Fed) and needs to incorporate local European (ECB) and Indian (RBI) indicators to better reflect local markets. Missing fundamental ratios: Adding quarterly fundamental financial data (P/E ratio, ROE, revenue growth) would stabilize the 30-day momentum forecasts. Sentiment and momentum: Incorporating alternative data (NLP sentiment analysis of financial news) and modeling volatility regime shifts (GARCH) would optimize the classification phases. | 1 |
| Stock-specific fundamentals & events – earnings surprise (EPS actual vs. estimate), days to next earnings, P/E, EV/EBITDA, revenue/margin growth, analyst revisions, short interest. Maybe something like even VIX as volatility might be a big factor. | 1 |
| Feature Engineering Priorities 1. Derived Rate, Inflation, and Momentum Features — Highest Value/Effort Ratio The tree already wants real rates and curve slope, but currently has to approximate them through multiple splits. Add: real_rate_10y = DGS10 − cpi_core_yoy real_rate_5y = DGS5 − cpi_core_yoy yield_slope_10y2y = DGS10 − DGS2 d_fedfunds_3m — 3-month change in the Fed funds rate d_cpi_yoy_3m — 3-month change in CPI YoY breakeven_10y = T10YIE — market-implied 10-year inflation Source: FRED — DGS2, DGS30, T10Y2Y, T10YIE; all available as free daily CSVs. Note: DGS2 and DGS30 are currently missing. 2. Non-US Macro — Biggest Structural Gap The 9 Indian (.NS) and 7 European names are currently explained primarily through US rates. RBI and ECB cycles can diverge materially from the Fed, particularly during 2022–24. Because the model currently splits on US CPI and rates, it can systematically misclassify non-US stocks. Add region-specific: Policy rate CPI YoY 10-year local government yield FX vs. USD Local equity-index growth Local implied volatility Sources: India: RBI DBIE — repo rate, India 10Y G-sec, USDINR reference rate; MoSPI — CPI/IIP; NSE — NIFTY 50 and INDIA VIX Europe: ECB Data Portal — deposit rate and €STR; Eurostat — HICP; ECB — FX; STOXX/Eurex — Euro Stoxx 50 3. Implied Volatility and Credit VIX, VSTOXX, INDIA VIX, MOVE, and HY/IG credit spreads are currently absent. The model only has realized volatility measures such as ATR and historical volatility. Implied volatility is valuable because it can lead realized volatility and captures risk-premium information that a tree cannot reliably infer from OHLCV alone. Sources: FRED: VIXCLS FRED: BAMLH0A0HYM2 — High-Yield OAS FRED: BAMLC0A0CM — Investment-Grade OAS CBOE NSE 4. FX There is currently no FX information. USDINR, EURUSD, and broad USD moves can be first-order 30-day drivers for the multinational names in the universe. A 5–10% move in INR or EUR can materially affect expected returns and earnings expectations. Sources: FRED DTWEXBGS (broad dollar), ECB, RBI. 5. Earnings and Corporate-Event Features There is currently no earnings or corporate-event information. Since the target is 30-day forward growth/return, event timing is potentially important; without it, precision may be capped around the current ~0.63 level. Add: Next earnings date Most recent earnings date Earnings-surprise magnitude Ex-dividend flag Analyst-revision data, if available Short-interest data, if available Sources: yfinance (Ticker.calendar), EODHD, Financial Modeling Prep. 6. Cross-Sectional Normalization and Regime Features This is primarily a methodological issue and requires no new data source. On any given date, features such as DGS10, cpi_core_yoy, and wti_365d are identical across all 33 tickers. The tree can therefore split on calendar regimes and effectively memorize time periods, which is consistent with the observed validation/test gap. Add: Per-date cross-sectional rank of each stock's features Per-date cross-sectional z-scores Explicit rate-regime labels Explicit inflation-regime labels days_to_month_end days_to_quarter_end Month/quarter-end flags This should directly target the model's tendency to learn time-specific rather than stock-specific relationships. 7. Target Redesign — Complementary Experiment Instead of predicting the raw 30-day return/sign, predict each stock's 30-day return relative to the equal-weighted 33-stock universe. This removes much of the market/rate regime that currently dominates the tree and forces the model to focus on stock-specific information. For panel data, this can provide a meaningful signal-to-noise improvement and is relatively cheap to test. Recommended Ranking Derived real-rate, yield-slope, and momentum features — FRED; ~10 lines of work; highest value/effort ratio. Non-US macro + FX + regional implied volatility — addresses the largest structural blind spot. Cross-sectional de-meaning + regime flags — no new data; directly targets the overfitting/validation-gap problem. Earnings and corporate-event features — requires a new data source; potentially the largest upside. Target redesign — cheap to test, but changes the modeling objective and framing. US/global implied volatility and credit — adds risk-premium information currently missing. Broader FX features — useful for the multinational exposure, but lower priority than the structural gaps above. | 1 |
| Missing data I would add, in order of expected value: 1. News flow and sentiment per company (headline counts and tone over 1/7/30 days). The tree only splits on macro and price, but what moves a single stock over the next 30 days is usually company-specific news. Source: GDELT, or the Alpha Vantage news endpoint. 2. Quarterly fundamentals and earnings surprise (reported vs expected EPS, revenue, margins, debt/EBITDA, P/E). Source: Financial Modeling Prep, or yfinance statements. 3. Analyst estimate revisions over the last 90 days - one of the more durable signals for 1-3 month returns. 4. Positioning and liquidity: short interest, volume relative to its 3-month average, options volume. Source: FINRA and yfinance. 5. Non-US macro, since the dataset covers India and the EU: ECB and RBI policy rates and inflation, EUR/USD and INR/USD. Today Indian and European stocks are explained with US rates and US CPI only, which is a clear gap. 6. Calendar features: days to the next earnings report, days to the next central bank meeting, options expiry. These should absorb part of the seasonality that currently lands in the week-of-month dummies (October_w4, November_w3). | 1 |
| Add earnings dates and earnings surprises, sector-relative returns for S&P, STOXX, and NIFTY sector indices, and local-market risk indicators such as VIX, India VIX, EUR/USD, and USD/INR. These capture event risk, industry effects, and regional drivers missing from the current technical and US macro features. Potential sources include company filings and earnings calendars, exchange or market-data providers for sector indices, CBOE or FRED for VIX, NSE for India VIX, the ECB Data Portal for EUR/USD, and RBI DBIE for USD/INR. | 1 |
| Based on our correlation analysis and Decision Tree feature importances (where macroeconomic indicators like CPI Core, FEDFUNDS, and interest rate yields ranked among the top splitting criteria), several key dimensions are missing: 1. Cross-Market Regional Macro Indicators: The dataset applies US macroeconomic data (FEDFUNDS, DGS1/5/10, CPI Core) uniformly across all 33 stocks, even though one-third are Indian (NSE) and one-third European (EU). - Missing: Reserve Bank of India (RBI) repo rate & India CPI/WPI; European Central Bank (ECB) deposit rate & Eurozone HICP; and currency exchange rates (USD/INR, EUR/USD) with 30-day realized volatility. - Source: FRED (St. Louis Fed) & Reserve Bank of India DBIE. 2. Market Sentiment & Volatility Regimes: Decision trees split heavily on macro yields because rate shifts signal regime changes. Explicit forward-looking volatility indicators would help isolate risk-on vs. risk-off regimes: - Missing: CBOE VIX (^VIX) for the US, India VIX (^INDIAVIX), and VSTOXX for Europe, as well as High Yield Option-Adjusted Credit Spreads (OAS) and 10Y-2Y Treasury yield curve inversion spreads. - Source: Yahoo Finance & FRED. 3. Fundamental Valuation & Earnings Calendar Anomalies: Pure technical indicators fail during corporate earnings re-rating events: - Missing: Trailing/Forward P/E, EV/EBITDA, Free Cash Flow Yield, days to next quarterly earnings release, and previous EPS surprise % (PEAD - Post-Earnings Announcement Drift effect). - Source: SEC EDGAR / Financial Modeling Prep (FMP) API / SimFin. 4. Institutional Order Flow & Microstructure: For emerging markets like India, institutional money flows dictate multi-week trend persistence: - Missing: Foreign Institutional Investor (FII) and Domestic Institutional Investor (DII) daily net buying/selling values; Short Interest Ratio and Days to Cover for US equities. - Source: NSE India / SEBI daily reports, FINRA. | 1 |
| Three useful additions to test are: Regional inflation and policy rates: Add EU and Indian economic conditions to the US-focused macro features. Sources: ECB Data Portal and RBI DBIE. Use values only after publication. Earnings surprises and valuation ratios: Add company information that price and macro features may miss. Sources: SEC EDGAR and company investor-relations filings. Use the values available when each filing was published. Volatility and exchange rates: Describe market risk and currency exposure across regions. Sources: Cboe VIX and ECB exchange rates. Align observations with the prediction time. | 1 |
| Proposed indicators, based on this notebook's results (the strongest correlations with the target and the decision tree's splits were US Treasury yields and the fed funds rate): Yield curve slope (10Y–2Y, 10Y–3M), from FRED T10Y2Y and T10Y3M. The tree needs several splits to approximate relationships between rate levels; the spread gives it that relationship as a single feature. Changes in rates (e.g. 30-day change in DGS10), derived from the existing data. Current macro features are levels only. Implied volatility (VIX), from FRED VIXCLS or yfinance ^VIX. All volatility features in the dataset are realized volatility. Credit spread (high-yield OAS), from FRED BAMLH0A0HYM2, a risk-appetite measure not captured by Treasury yields. Non-US macro and FX. The dataset includes EU and India stocks, but all macro variables are US series. Candidates: EUR/USD and USD/INR (yfinance EURUSD=X, INR=X), ECB deposit rate (FRED ECBDFR). Alternative approach: tree ensembles (random forest, gradient boosting) on the same dataset and temporal split. Single-tree test precision varied non-monotonically with depth (0.572–0.629), and two depth-10 trees differing only in random_state scored 0.574 vs 0.598, so ensembling would reduce that variance. None of these has been tested yet. | 1 |
| 1. Yield-curve shape & real rates – spread seperti DGS10-DGS2, DGS10-DGS3MO, dan 10Y real yield (DFII10) 2. Risk sentiment / volatility – VIX, India VIX, VSTOXX, credit spreads 3. Local macro for non-US stocks – dataset punya saham India & EU tapi makro hanya US: perlu RBI repo rate, ECB deposit rate, Bund 10Y yield, INR/USD, EUR/USD FX, local indices 4. Company fundamentals & events – earnings dates, P/E, EPS revisions, days-to-next-earnings, dividends/splits 5. Relative / cross-sectional features – stock growth relative to index/sector, rank momentum antar tickers 6. Commodities & dollar – oil, gold, DXY, Bitcoin 7. Calendar events – FOMC meeting days, options expiry week, month-end/quarter-end flags, pre-holiday days | 1 |
| I would add company earnings data: announcement dates, earnings surprises, and changes in analyst forecasts. These could help explain stock movements that historical prices, technical indicators, and macroeconomic variables do not capture. I would also consider company-specific news sentiment. To avoid data leakage, each feature must use only information available on the prediction date. I would test whether these additions improve performance compared with the existing model. | 1 |
| Missing data I would add: - ECB interest rate and Eurozone inflation (for EU stocks) - RBI repo rate and Indian CPI (for Indian stocks) - VIX and India VIX - US dollar index - Company fundamentals (P/E, earnings growth, revenue growth, debt) - Earnings announcement dates - Sector information | 1 |
| Market Volatility & Sentiment Indicators: VIX, India VIX, V2TX (Europe): Implied volatility indices capture market-wide risk-on/risk-off regimes. When volatility spikes, cross-sectional stock momentum behaves very differently. Source: Yahoo Finance (^VIX, ^INDIAVIX), CBOE. Corporate Earnings & Earnings Surprise Data: Days to / from Earnings Announcement: Stock returns in 30-day windows are heavily influenced by quarterly earnings releases. Earnings Surprise Momentum: Normalized deviation of actual EPS vs. consensus estimate. Source: Financial Modeling Prep (FMP) API, Alpha Vantage. Global Commodities and FX Rates: Crude Oil (Brent / WTI) & Gold: Crucial for India (net energy importer) and EU/US industrial and materials sectors. Currency Exchange Rates (USD/INR, EUR/USD, DXY Index): Strongly impacts multi-national earnings and foreign capital flows. Source: FRED (Federal Reserve Economic Data) API, Yahoo Finance. Foreign Institutional Investor (FII / FPI) Flows: For emerging markets like India, net monthly FII inflows/outflows are among the strongest drivers of broad market trends. Source: National Stock Exchange of India (NSE) / NSDL data. | 1 |
| Regional macro data and company fundamentals. | 1 |
| There might be many ideas ) For example: to add each stock’s 20- and 60-day return relative to its local market index. It could help to identify stocks that outperform their market rather than simply follow a rally. | 1 |
| sentiment analysis data | 1 |
| The results show that rates and inflation carry most of the signal. The original tree split on cpi_core_yoy, DGS10 and FEDFUNDS, and the two strongest hand rules, pred3 and pred4, are built on US yields. The thresholds in those rules (4.5% and 4.795%) reflect US rates over this sample period, and the calendar dummies add much less. The main gap is that every stock, including the Indian and European names, is paired with the same US macro series, even though their returns depend on their own central banks and currencies. To close the rate gap, I would add the local policy rates: the RBI repo rate for India and the ECB deposit facility rate for the euro area, both from the central banks’ published histories. For the US, I would add the yield curve as the 10-year minus 2-year spread (T10Y2Y) and the 2-year yield (DGS2), the real 10-year yield (DFII10), and the high-yield credit spread (BAMLH0A0HYM2), all from FRED through pandas_datareader. The curve shape separates easing from tightening better than the rate level alone, the real yield is the discount rate that matters most for long-duration growth stocks, and credit stress often shows up before equity drawdowns. For market conditions, I would add the VIX (^VIX from yfinance), since the existing volatility feature is computed per ticker and says nothing about the market as a whole. Relative strength against the local index (^NSEI for India, ^STOXX50E for the EU, ^GSPC for the US) separates stock-specific moves from regional ones. Currency matters because USD returns depend on exchange-rate moves, so I would add USD/INR and EUR/USD (DEXINUS and DEXUSEU from FRED, or INR=X and EURUSD=X from yfinance), along with Brent crude (BZ=F) for the input costs of Indian and European industrials. On the stock side, days to the next earnings and the last earnings surprise (from yfinance earnings_dates) capture the largest single-stock event in a 30-day window, dollar volume or Amihud illiquidity would replace raw Volume, which is not comparable across tickers with different share prices, and distance from the 52-week high and the 200-day moving average would give a longer trend view than the current 10 and 20-day averages. Central bank meeting flags for FOMC, RBI and ECB dates would mark the known event windows. Some caveats apply. Revised macro data, GDP especially, can leak future information into the model, so I would use the values available on each date where possible or state that revisions were ignored. yfinance earnings history is patchy for some tickers, so coverage needs checking before that feature is added. Each new group should be followed by a fresh depth search, because test precision moves noticeably between neighbouring depths, and a single run cannot show whether a new feature actually helps. If regional differences remain large after these additions, a separate model per region, or region as a feature, is worth testing alongside the new indicators. | 1 |
| The "52-week high effect" is one of the most robust cross-sectional anomalies for 1-month horizons (George & Hwang 2004). | 1 |
| The tree (depth 4) splits almost only on macro and cross-asset regime variables (cpi_core_yoy, DGS10, FEDFUNDS, DGS1, gold/oil/BTC 365d growth). These values are identical for all 33 tickers on a given day, so the model mostly learns "is this a good period" and cannot rank stocks against each other on the same date. I would add stock-relative and regime data: 1. Yield-curve slope and credit stress from FRED: T10Y2Y / T10Y3M and the ICE BofA US High Yield OAS (BAMLH0A0HYM2). They are a better recession/risk-off signal than raw DGS10 levels. 2. Implied volatility: ^VIX, ^INDIAVIX and VSTOXX (yfinance / stoxx.com) as a fear gauge per region. 3. FX: DXY (DX-Y.NYB), USDINR=X, EURUSD=X. Indian and EU stocks and the US-listed ADRs (HDB, IBN, INFY) move with the dollar. 4. Local macro for non-US names: ECB deposit rate (FRED ECBDFR), euro-area HICP, RBI repo rate / India CPI. Today only US macro is in the set. 5. Relative strength: a stock's 30/90d growth minus its home index (^NSEI, ^STOXX50E, ^GSPC), plus earnings-calendar features (days to next earnings, last EPS surprise from yfinance get_earnings_dates). These vary across tickers on the same day, which the macro features cannot do. | 1 |
| I would add company-level earnings surprises (reported EPS/revenue versus analyst consensus) and earnings-estimate revisions. These capture new company-specific information that broad market returns, technical indicators, and interest rates may miss, and could help explain future 30-day growth. Sources: Yahoo Finance earnings data where available, supplemented by official filings from SEC EDGAR (US), NSE/BSE (India), and ESMA/ESEF (EU). | 1 |
| To improve performance, it would be valuable to incorporate data from Twitter/X or financial headlines processed using language models (NLP) from news APIs such as Bloomberg or Reuters. | 1 |
| Proposed additional indicators & data sources: 1. Market microstructure & sentiment - Options indicators: implied-volatility skew, put/call ratio, VIX term structure. - News/earnings-call sentiment scores (LLM-derived) from headlines and transcripts. 2. Global macro & liquidity - Central bank balance sheets (Fed WALCL, ECB, RBI). - 10Y-2Y yield spread momentum and real rates (TIPS yield). Reasoning: DGS10 / FEDFUNDS move slowly and describe the broad regime; technical indicators describe price momentum. Options-implied expectations and liquidity measures bridge the gap between long-term macro trends and the 30-day horizon being predicted. | 1 |
| The macro block is US-only (CPI, Fed funds, Treasury yields), while 21 of the 33 companies are European or Indian. In the course run the tree's most important features are slow macro variables (core CPI, Fed funds, 365-day growth of gold and oil), so the biggest gaps are regional and regime data: 1. **Local monetary policy and inflation**: ECB deposit facility rate (FRED: `ECBDFR`), euro-area HICP, RBI repo rate and India CPI. A rule on US rates cannot see an ECB or RBI cycle that diverges from the Fed. 2. **Currencies**: EUR/USD (FRED: `DEXUSEU`) and USD/INR (FRED: `DEXINUS`). Several tickers are US-listed shares of foreign companies (HDB, IBN, INFY, NVO, TTE), so their USD returns mix company performance with FX moves. 3. **Regional benchmarks**: Nifty 50 (`^NSEI`), Euro Stoxx 50 (`^STOXX50E`) and CAC 40 (`^FCHI`) from Yahoo Finance. Four tickers trade in Paris and eight on the NSE, but the data has only DAX, S&P 500, Dow Jones and the US-listed EPI ETF. Local indices would also allow relative strength: a stock's growth vs its own market. 4. **Market-wide risk sentiment**: VIX (FRED: `VIXCLS`) and India VIX. The data has each stock's own volatility, but no market fear gauge. 5. **Yield-curve spread as a ready feature**: 10Y minus 2Y (FRED: `T10Y2Y`) instead of separate yield levels; the inversion is the recession signal from Module 1. 6. **Earnings**: report dates and surprises (yfinance earnings dates), since a 30-day window often contains a report. Some existing features need a transformation rather than new data: cumulative indicators (OBV, A/D line) trend over time and work as time stamps for the tree; their 30-day changes or z-scores would generalise better. | 1 |
| The tree is driven almost entirely by US macro levels (cpi_core_yoy, FEDFUNDS, DGS10, DGS1) and 30–365d growth of oil/gold/BTC/DJI, while calendar dummies barely matter (max |corr| of any month-week dummy is 0.025). Levels of rates are regime-specific — pred4 (DGS10 > 4 & FEDFUNDS ≤ 4.795) collapses to 0.50 precision on TEST — so I would add: Local macro + FX for the non-US two-thirds of the panel. India and EU stocks are explained only with US macro today. Add RBI repo rate / India CPI (RBI DBIE, FRED INDCPIALLMINMEI), ECB deposit rate / euro-area HICP (ECB Data Portal, FRED ECBDFR), and FX INR=X, EURUSD=X from yfinance, because a USD investor's 30d return in RELIANCE.NS or MC.PA depends on them. Curve shape and credit instead of rate levels: 10y–2y and 10y–3m spreads (FRED T10Y2Y, T10Y3M), high-yield OAS (BAMLH0A0HYM2). Spreads are more stationary across regimes than raw DGS10/FEDFUNDS levels. Risk sentiment / implied volatility: ^VIX, ^VSTOXX (or ^V2TX), ^INDIAVIX — 30d forward returns depend on the volatility regime at entry. Earnings and valuation: days-to-next-earnings, last EPS surprise and forward P/E (yfinance get_earnings_dates() / info), since every 30-day window can contain an earnings release. Regional relative strength and cross-sectional ranks: growth vs the stock's own benchmark (^NSEI, ^STOXX50E, ^GSPC) and the momentum rank among the 33 tickers on each date, which are scale-free and transfer across time better than absolute growth values. Modeling-wise, I would also replace raw levels with changes/z-scores and use walk-forward validation, because one fixed 2022–2026 test window rewards whatever macro regime happened to dominate it. | 1 |
| The correlation analysis and the decision trees show that macro variables and recent price momentum carry most of the signal, while month and week-of-month dummies add only a little. Based on that, I would add: 1. Market stress and risk appetite: the VIX, the high-yield credit spread (FRED BAMLH0A0HYM2) and the 10Y-2Y Treasury spread (FRED T10Y2Y). The trees already use rates, so the shape of the yield curve and credit conditions are the natural next step. 2. Dollar and commodities: a broad US dollar index (FRED DTWEXBGS) and oil prices (FRED DCOILWTICO). The dataset mixes stocks from India, the EU and the US, which react very differently to currency and energy prices. 3. Earnings calendar: days until and since the next earnings date (Yahoo Finance, get_earnings_dates). A 30-day horizon often contains an earnings announcement, and prices move strongly around them. 4. Sector and valuation data: sector dummies and ratios such as P/E and price-to-book (Yahoo Finance), plus performance relative to the stock's own sector index. Today the model only has ticker dummies, so it cannot generalize to similar companies. 5. Local macro for India and the EU, the dataset only has US macro variables, so I would add the ECB policy rate and Euro area inflation (Eurostat) and the RBI policy rate and Indian inflation, matched to each stock's country. To avoid data leakage, every new variable must be lagged to its publication date so the model only uses information available on the prediction day. | 1 |
| The tuned tree (depth 4, precision 0.629) uses almost only macro regime features (CPI, oil, BTC, gold, FEDFUNDS, DGS10). Technical indicators and month_wom dummies get zero importance. Rules on rate levels don't generalise either: pred4 scores 0.503, below the 0.570 baseline. All macro data is also US-only, although the universe includes India and EU stocks. I would add: 1. Volatility/risk regime: VIX, India VIX, VSTOXX (yfinance). 2. Yield-curve slope and credit spreads instead of rate levels: T10Y2Y, HY OAS (FRED). 3. Local macro and FX for India/EU: local 10Y yields, policy rates, USDINR, EURUSD (FRED, yfinance). 4. Relative strength vs the local index and sector, plus earnings dates/surprises (yfinance). | 1 |
| The depth-10 tree leans on US core CPI, one-year gold and oil growth, and the funds rate. I would add the CPI surprise (actual minus consensus), because the file already has the CPI change and not whether the print was a surprise. A public source is the Cleveland Fed inflation nowcast. | 1 |
| I would include additional macroeconomic indicators such as inflation rates, GDP growth, exchange rates, and crude oil prices because they influence market conditions and stock performance. I would also include company fundamentals such as earnings per share (EPS), price-to-earnings (P/E) ratio, revenue growth, and debt-to-equity ratio to capture each company's financial health. These additional variables could improve the model's ability to predict stock price growth over the next 30 days. Possible data sources include Yahoo Finance, the World Bank, and the Federal Reserve Economic Data (FRED) database. | 1 |
| The trees rely on US macro levels, which mostly mark the time period, so the model overfits. I'd add rate and inflation changes instead of levels, India/EU macro and FX rates (a third of the stocks are non-US), VIX, and each stock's return relative to its home index. | 1 |
| What’s missing is cross-sectional rank: every feature is an absolute value, but “RSI 25” means something different for NVDA than for Hindustan Unilever, so one threshold across 33 mixed tickers is meaningless for most of them. I would add each indicator’s daily percentile rank within its market. | 1 |
| To improve stock growth prediction across global equities (US, EU, India), incorporating cross-asset macro indicators and market micro-structure metrics would address current gaps: * Central Bank & Inflation Trends: Short-term rate momentum (e.g., European Central Bank and Reserve Bank of India policy rate spreads) and real yield metrics offer better regional context than static yield levels. * Sector-Relative Momentum & Earnings Sentiment: Adding analyst earnings revision trends, short interest ratios, and relative sector strength (e.g., stock performance relative to its national benchmark index) provides valuable signal depth beyond technical indicators. | 1 |
| I would add point-in-time company fundamentals such as earnings surprises, revenue growth, free cash flow, and valuation ratios. These indicators can help explain whether a positive price trend is supported by business performance. I would also include sector-relative returns, trading liquidity, short interest, and changes in analyst expectations. Because the dataset covers major stocks across the US, EU, and India, I would add country-specific interest rates, currency returns, and market benchmarks. Sources could include SEC EDGAR for US filings, stock exchange disclosures for Europe and India, and FRED or ECB datasets for macroeconomic series. I would evaluate these features with walk-forward testing and only use information available at the prediction date to avoid look-ahead bias. | 1 |
| I would add fundamental data (P/E, revenue and earnings growth from quarterly reports), market sentiment indicators like the VIX volatility index, and sector-level data, since stocks in the same sector often move together. For stocks from India and the EU, I would add local macro data (local interest rates, inflation and currency exchange rates against USD), because US macro indicators alone don’t explain their performance well. Data could come from FRED, Yahoo Finance and the central banks’ websites. | 1 |
| Volatility / risk-regime features. Add the VIX (^VIX) and its 30-day change, plus the yield-curve slope (e.g. DGS10 - DGS2 or T10Y2Y) and credit spreads (BAA10Y). The current macro set only has the level of rates; the shape of the curve and market fear drive 30-day forward equity growth. Source: FRED (DGS2, T10Y2Y, BAA10Y, VIXCLS) via pandas_datareader/yfinance. Sector / breadth features. Sector-ETF returns (XLE, XLF, XLK, ...) and market breadth (share of S&P 500 members above their 200-day SMA) capture rotation that single-ticker technicals miss. Source: yfinance + S&P 500 constituents list. Sentiment / news. Daily news-sentiment scores or Google-Trends interest per ticker, and earnings-surprise magnitude, are leading indicators absent from pure price features. Source: yfinance earnings dates, GDELT / news APIs. Rationale. The tree keeps choosing rate levels and October/November seasonality; adding curve slope, VIX and breadth should separate 'calm uptrend' from 'late-cycle' regimes and improve the precision of positive-growth predictions. | 1 |
| Regional Policy Rate Spreads (Global Macro Arbitrage): Measures interest rate differences (e.g., Fed vs. RBI/ECB) using FRED/DBnomics APIs. This helps capture global foreign capital flows and currency changes that shift equity valuations across US, EU, and Indian markets. Market Sentiment and Volatility Regimes (Risk Indicators): Tracks volatility indices (US VIX, India VIX, V2TX) and yield curve spreads via Yahoo Finance and FRED. These features segment high-fear regimes and macro credit restrictions that structurally alter the success rate of technical triggers. Systematic Volume Liquidity & Breadth Indicators (Scalable Momentum): Calculates Chaikin Money Flow (CMF) and average volume force from current OHLCV data. These metrics scale and normalize volume momentum, preventing larger US stock volumes from overwhelming the models' split thresholds. | 1 |
| The current feature set is heavy on price-derived technical indicators and broad macro aggregates, but misses several drivers that materially affect 30-day forward returns: - Volatility regime & skew — VIX level, VIX term structure (contango/backwardation), and the SKEW index to capture tail-risk sentiment. Volatility regime (VIX > 25 vs < 15) completely changes the success rate of oversold signals. - Credit & liquidity conditions — HY corporate bond spreads (BAMLH0A0HYM2 from FRED), TED spread, and the 2s10s yield curve slope. These lead equity drawdowns by weeks-to-months. - Cross-asset momentum — Bitcoin, gold, and oil 30-day returns are already in the dataset but I'd add sector-ETF relative strength (XLK vs SPY, XLF vs SPY) and international equity momentum (EFA, EEM) to capture risk-on/risk-off rotations. - Earnings surprises & sentiment — The EPS beat/miss % we used in Homework 1, aggregated to a rolling 4-week factor; plus news sentiment (FinBERT) and Put/Call ratio for short-term fear/greed. - Volume-price confirmation — On-Balance Volume slope, VWAP distance, and institutional accumulation/distribution to confirm breakouts vs. fakeouts. - Positioning / flows — AAII bull-bear survey and equity fund ETF flows as contrarian signals. Alternative approach: I'd switch from a single shallow decision tree to a LightGBM gradient-boosted model trained with walk-forward validation (expanding window, retrain quarterly), with a regime filter that refuses to trade when VIX > 30 or HY spreads blow out. This typically lifts precision 5–8 points over a single tree while keeping overfitting under control. Data sources: FRED (spreads, yields), 'yfinance' for ETFs, Yahoo Finance earnings calendar, CBOE for put/call & VIX term structure. | 1 |
| The decision tree leans on US macro variables (DGS10, DGS5, FEDFUNDS, CPI), but about two thirds of the dataset’s tickers are EU and India stocks that only see US macro. So the first things I’d add are: Regional macro for those markets: the ECB deposit rate and euro-area inflation, and the RBI repo rate and Indian CPI, plus the INR/USD and EUR/USD exchange rates. Risk-regime indicators: the VIX and the 10-year minus 2-year yield spread (DGS10 − DGS2), which would capture the market regime that the rate variables are only proxying. Company fundamentals: P/E, earnings growth, free cash flow and debt ratios. The current features are all price and technical, so the model has no sense of valuation. Earnings calendar and surprises: days to the next earnings report and the last surprise. A 30-day horizon often spans an earnings date, which moves returns a lot. | 1 |
| 1. Non-US macro data. All the macro features (FEDFUNDS, DGS5/10, cpi_core_*) are US data, but about half the tickers are Indian or European. An Indian bank like SBIN.NS is driven more by the Reserve Bank of India than the Fed. Add the ECB deposit rate, German 10-year Bund yield, India repo rate, and India and Eurozone inflation. Source: FRED has many of these (e.g. ECBDFR for the ECB rate, IRLTLT01DEM156N for the German 10-year yield). Others are on the ECB Data Portal and the RBI website. 2. Currency exchange rates. Prices are in local currencies (INR, EUR, USD). A falling rupee can make Indian stocks less attractive to foreign investors even when the companies are doing well. Add USD/INR and EUR/USD daily growth over 30/90/365 days, matching the existing growth_* features. Source: yfinance tickers INR=X and EURUSD=X. 3. Volatility / fear indices. The model has each stock’s own volatility but no market-wide “fear gauge”. Add VIX (US), VSTOXX (EU), and India VIX. Source: yfinance ^VIX and ^INDIAVIX; VSTOXX from STOXX. 4. The yield curve instead of single rates. DGS10 and DGS5 were important, but the spread between long- and short-term rates is a well-known recession signal. An inverted curve (short-term rates above long-term) often comes before market downturns. Add 10-year minus 2-year (T10Y2Y on FRED), or compute DGS10 - DGS1 from columns you already have. 5. Company fundamentals and earnings. The model sees only prices, technicals and macro, and nothing about the companies themselves. Earnings announcements often cause the biggest 30-day moves. Add P/E ratio, earnings surprise (actual vs expected), and days until the next earnings report. Source: yfinance (Ticker.earnings_dates, Ticker.financials). | 1 |
| The dataset is missing additional technical indicators such as RSI and MACD, company fundamentals such as earnings per share and P/E ratio, market sentiment indicators, trading volume changes, and broader market indices. These variables could improve stock-growth predictions across India, Europe, and the United States. | 1 |
| I would like to introduce the indicators used in the previous module considering the 21 trading days used for growth but this time use a different model and technique to select most important features. | 1 |
| I would add VIX and changes in trading volume as new features. A higher VIX can mean more market uncertainty, which may reduce the chance of positive returns. A big change in trading volume can show stronger buying or selling activity. These features may help the model predict if a stock will have a positive return in the next 30 days. | 1 |
| I would add company financial indicators such as Earnings Per Share (EPS), Price-to-Earnings (P/E) ratio, and revenue growth, along with market sentiment indicators such as the VIX and macroeconomic data such as inflation and interest rates. These features could help explain stock price movements beyond technical indicators and improve predictions of 30-day stock growth. I would collect the data from Yahoo Finance, FRED, and World Bank Open Data. I would then evaluate whether these additional features improve the model using time-based validation while avoiding data leakage. | 1 |
| ossible additions include analyst estimates, earnings revisions, short interest, options-implied volatility, liquidity/spread data, sector returns, market breadth, and sentiment. | 1 |
| These short-term growth metrics and technical indicators typically contain missing values at the beginning of each stock ticker's timeline, where insufficient historical data is available to calculate the required rolling windows or technical indicators. | 1 |
| I propose evaluating the Decision Tree within macroeconomic regimes, using the existing course dataset. Inflation and interest rates appear among its first splits, while all test observations follow the right branch of the root and precision and recall decline. These observations motivate investigating whether performance differs across macro contexts. To explore this approach, I standardized core inflation (cpi_core_yoy), the 10-year Treasury yield (DGS10) and the federal funds rate (FEDFUNDS), using one observation per date. I fitted KMeans with two clusters on training dates only and assigned validation and test dates to those regimes. On validation, regime 0 had precision 0.647 and recall 0.793. In regime 1, the tree made no positive predictions, giving zero recall and undefined precision. All test observations belonged to regime 1; after refitting the tree on train + validation, its exploratory test precision and recall were 0.553 and 0.364. These results support using macro regimes as a diagnostic layer to identify where the classifier misses positive cases, interpret aggregate performance and guide future work on temporal stability and additional indicators. | 1 |
| To further enhance stock growth prediction models across global markets (US, EU, India), incorporating alternative data sources and sentiment indicators would be highly valuable. | 1 |
| I propose adding range-based intraday volatility indicators (such as Parkinson or Garman-Klass) using High and Low prices. This provides the model with a richer signal of true price intensity during trading sessions, helping to filter out market noise across global equities. | 1 |
| I would add earnings information and a measure of market uncertainty. For earnings, I would start with the surprise from the latest report and the number of days until the next announced earnings release. The existing features show price movements, but they do not directly show whether a company's results beat expectations. Alpha Vantage provides earnings data, although I would check its coverage for each stock. I would also try VIX and its recent change, using daily data from FRED. This could help distinguish a calm market from a period of uncertainty, when the same price trend might behave differently. I would only use information available at the time of each prediction. I would test the new features on later dates, comparing precision and the number of positive predictions with the original model. These are ideas to test, rather than changes I can already claim improve performance. | 1 |
| ### [EXPLORATORY] Question 5: What data is missing? ### 1. Sector/Index Relative Strength What it is: Each stock's return relative to its benchmark index (e.g., NIFTY 50 for India, STOXX 600 for EU, S&P 500 for US) over rolling windows (5d, 20d). Why: A stock rising while its index falls signals real strength. The current dataset likely uses absolute returns — adding relative performance gives the Decision Tree a much better signal to separate genuine movers from index-driven ones. Data Source: Already available via yfinance — just pull the index alongside stocks and compute the ratio. ### 2. Macro Indicator: USD Index (DXY) + VIX What it is: Two daily macro indicators: VIX — market fear gauge (volatility expectation) DXY — US Dollar strength index Why: These are cross-market signals that affect ALL stocks globally — a rising DXY hurts Indian/EU stocks priced in local currency, and a high VIX signals risk-off behavior. These are missing from most price-only datasets but are freely available. Data Source: Both available via yfinance — tickers ^VIX and DX-Y.NYB ### AI-assisted research — Claude Sonnet 4.6 | 1 |
| I would add more information about the overall market and the company itself. For example, I would include the VIX, earnings results, sector performance, revenue growth, and some basic valuation indicators. I think this could help the model understand not only what happened to the stock price, but also why it moved. I would get this data from sources like Yahoo Finance, FRED, SEC filings, and company reports. | 1 |
| 12345 | 1 |
| - | 1 |
| I would add company earnings surprises, valuation ratios, analyst estimate revisions, and sector-level market returns. Earnings surprises: The difference between reported earnings and analyst expectations may help explain short-term stock price movements. Valuation ratios: Metrics such as price-to-earnings and price-to-book ratios could help distinguish companies with different growth expectations. Analyst estimate revisions: Upward or downward changes in earnings forecasts may provide information about future investor sentiment. Sector-level returns: Industry-specific performance could help explain why stocks in the same sector move together. I would obtain company fundamentals and earnings data from financial statement databases or company investor-relations reports, and use a market data provider for sector returns. I would align every feature to the date it actually became publicly available to avoid data leakage. | 1 |
| ## Q5 — Qué datos faltan (exploratorio) 1. Régimen: VIX/vol realizada, HY OAS, pendiente 2s10s y sorpresas macro. 2. Divergencia regional RBI/ECB/Fed, FX USD/EUR/INR y pertenencia a índices (`ticker_type` es grueso). 3. Microestructura: turnover free-float, ATR normalizado, corporate actions y borrow-cost. 4. Forward fundamentals point-in-time: earnings yield vs DGS10, revisiones y calendario. 5. Alternativos: sentimiento (GDELT/RavenPack) y breadth sectorial. Fuentes: FRED/ECB/RBI, OHLCV actual, TA-Lib; Worldscope/Compustat o vendor para fundamentales. | 1 |
| I think the CBOE Volatility Index (VIX) could be an additional feature to help predict future stock growth. The VIX measures the market's expectation of volatility over the next 30 days, making it particularly relevant to our target variable, is_positive_growth_30d_future. | 1 |
| 1. Valuation/fundamentals (P/E, FCF yield, ROE, earnings revisions — Compustat/FMP). 2. Sentiment/positioning (short interest, put/call, news sentiment, insider trades). 3. Regime spreads, not just levels: VIX, HY spread, `DGS10-DGS2`, DXY, sector breadth. 4. Non-US macro (universe is US/EU/INDIA but macro is US-only): ECB/RBI rates, CPI, FX. 5. Source: FRED + yfinance, all lagged to avoid leakage. | 1 |
| - VIX/credit spread - Local macro for EU and India - Features relative to the index or sector | 1 |
Calculated: 14 October 2026, 17:33