New Update to Optimal ETF Portfolio Dashboard

Reading time ~2 minutes

As some of you may have noticed, Yahoo! Finance API has stopped working for the past few days because the service has allegedly been discontinued (more details here, which has in turn corrupted a lot of R programs that rely on the API, including this dashboard. Luckily I have found a temporary fix that addresses this issue.

It’s true that Yahoo! has discontinued the service, but they still host the data on their server, albeit making them more difficult to access and download by adding a “crumb” to their url. You will now have to establish a session with Yahoo! Finance by entering, for example, https://finance.yahoo.com/quote/AAPL/history?p=AAPL, with your browser to get that crumb.

How to get the crumb, in fine points

Here’s a step by step guideline to get that sacred piece of information

  1. Go to https://finance.yahoo.com/quote/AAPL/history?p=AAPL with your browser. Any ticker other than “AAPL” is fine as well.
  2. Look for the “Download Data” button and right click and copy the link
  3. Near the end of the link you’ll see something like “&crumb=”. Copy whatever follows it. Congrats, you have found the crumb.

So I have the crumb now, what’s next?

You’ll need to gingerly paste the crumb into the box on the sidebar and you’re set to use the dashboard as usual. One caveat though, that this workaround requires a new browser tab/window to open for each ETF ticker you selected. This is admittedly not the best idea, but it works so I’m going to stick to it until a better fix comes around. I’m more than happy to hear what you think, so feel free to comment below your suggestions.

Solving Lunar Lander with Double Dueling Deep Q-Network and PyTorch

### Problem StatementThe environment is called `LunarLander-v2` which is part of the Python `gym` package @lunarlander. An episode always...… Continue reading

Counting Inversions - C++

Published on June 05, 2017

Karatsuba Multiplication Algorithm - C++

Published on May 29, 2017