Pulling Swiss Market Index Data Without Losing Your Mind
Yahoo Finance doesn't hand you clean OHLC data on a silver platter anymore. The API changed around 2020 and broke a lot of scripts. The Swiss Market Index — SMI, ticker SSMI on Yahoo — is just another endpoint now, but it has its own little quirks that will trip you up if you've only ever pulled US equities. Here's what actually works. The most straightforward method these days uses the yfinance Python library. Install it with pip if you haven't already, then: import yfinance as yf
smi = yf.Ticker("SSMI")
df = smi.history(period="1d", interval="1m")
That gives you 1-minute candles for the current trading day. The symbol "SSMI" is what Yahoo uses for the Swiss Market Index. Sometimes people try "SWIX" or "SI" and get errors or wrong data. Stick with SSMI.
Swiss Market Index Smi Decoding Yahoo Finance Data In Real Time
Here's where people get confused. Yahoo Finance's "real time" is a lie for most users. Free tier data is delayed by 15 minutes. If you're pulling 1-minute bars during the middle of the Zurich trading day (09:00–17:30 CET), the most recent bar you're seeing is actually from 15 minutes ago. You won't know it until you cross-reference against a broker feed. I learned this the hard way during a live session last year when my alert system was firing on stale data and I missed a genuine spike in the index. The workaround is straightforward. Pull the data from Yahoo for the bulk of your backfill and normal monitoring, then layer in a direct market data source — like Interactive Brokers API, TradingView webhooks, or even a simple scrape of the SIX Group website — for the last few minutes. The SIX homepage publishes the current index value with less delay than Yahoo's free tier. It's not API-friendly but a quick request to their site gets you the number within seconds. If you need true tick-level data, Yahoo isn't the tool. Their endpoint caps out at 1-minute granularity for free, and even then the interval has gotten stricter over the past two years. For anything beyond 1-minute bars, switch providers or pay for a subscription that includes real-time exchange feeds.
Get the Full Details

Another thing nobody warns you about: the SMI uses a price-weighted methodology, same as the Dow Jones. That means a stock with a higher nominal price exerts disproportionate influence on the index. When Nestlé or Roche moves 2%, it moves the SMI more than most other constituents combined. This matters if you're building a model that assumes equal-weight exposure. It's not equal-weight. It's roughly price-weighted with some adjustments for special dividends and corporate actions. The weighting changes slightly at each semi-annual review, and Yahoo doesn't always reflect those changes immediately in their historical data. I ran into a specific edge case last autumn. The SMI had a scheduled rebalance on June 21st, 2024. Yahoo's adjusted close prices for several constituents showed a gap that didn't correspond to any actual market event. The issue was a dividend adjustment that Yahoo applied retroactively, which distorted the lookback window in my backtesting script. The fix was to pull the raw unadjusted data for the week around the rebalance, verify the closing prices against the SIX published history, and then use that manually corrected series as ground truth. Takes about twenty minutes per rebalance event. Do it once and you'll remember for the next one. Here's a more complete script that handles timezone conversion, which matters because Yahoo returns data in the exchange's local timezone but labels it ambiguously:
import yfinance as yf
from datetime import datetime, timezone
import pytz
smi = yf.Ticker("SSMI")
df = smi.history(period="5d", interval="5m")
Yahoo returns timestamps in local exchange timezone
Convert to UTC for consistency
tz_zurich = pytz.timezone("Europe/Zurich")
df.index = df.index.tz_localize(tz_zurich).tz_convert(timezone.utc)
print(df.tail()) The 5-minute interval is useful because 1-minute data gets noisy and Yahoo occasionally skips bars during low-liquidity periods in the SMI. Five minutes smooths that out without adding much lag. The Zurich session runs 09:00 to 17:30 local time, with the most liquid period between 10:00 and 11:30 when European markets overlap. Outside those hours, volume drops significantly and price movements become erratic — not useful for real-time strategies. One more thing: the SMI has a pre-market and after-hours component, but Yahoo Finance doesn't reliably populate those sessions for European indexes the way it does for US equities. Don't expect meaningful pre-open data. The first reliable bar is usually around 08:45 Zurich time, which is when the matching engine starts accepting orders before the official open.
If you're trying to do this without coding, Yahoo's website shows the current value and a basic chart. You can see the index move minute by minute, but you can't automate it. Scraping the page itself is possible but fragile — Yahoo changes their DOM structure regularly and you'll spend more time maintaining the scraper than you'd save. Not worth it unless you have a very specific need that yfinance can't already handle. The biggest limitation to keep in mind: Yahoo Finance data is fine for educational projects, personal monitoring, and casual analysis. It's not suitable for production trading systems. The delayed quotes, occasional gaps in historical series, and lack of guaranteed uptime mean you're building on sand. If this is for anything money-related, get a proper data feed. For everything else, the approach above will get you moving in about ten minutes.
