Posts for Tag: animation

Shall We Play A (Market Timing) Game?

Posted In: Financial Independence | Money
Facebooktwittergoogle_plusredditpinterestlinkedinmail


The Market Timing Game simulation is premised on the idea that buying-and-holding index investing and index funds are a no-brainer investment strategy and market timing (i.e. trying to predict market direction and trading accordingly) is a less than optimal strategy. The saying goes “Time in the market not timing the market”. In this simulation, you are given a 3-year market period from sometime in history (between 1950 and 2018) and you start fully invested in the market and can trade out of (and into) the market if you feel like the market will fall (or rise). The goal is to see if you can beat the market index returns.

If you get the 80’s movie reference to “WarGames”, then you might guess the best way to avoid losing the Market Timing Game.

Another way to put this is just to buy and hold. Put your investments into low-cost index funds and don’t worry (too much) about the ups and downs of the market. They always happen, but over time, stocks tend to go up and trying to time when to get into or out of the market leads to sub-optimal result for most regular investors and even many professional investors.

Data and Tools: Daily, historical dividend adjusted prices for the S&P500 stock index (between 1950 and 2018) were downloaded from Yahoo! Finance. The game was programmed in Javascript using the Plot.ly engine to create the graph.

Interactive Dot Illusion (Individual Linear Motion Yields Circular Motion)

Posted In: Fun
Facebooktwittergoogle_plusredditpinterestlinkedinmail

This post doesn’t really involve data, but I was just messing around with animation and the canvas in Javascript and decided to make this. It’s a fun little interactive web animation that makes aggregate circular motion from a bunch of dots moving in straight lines. There are no real instructions except to mess with the controls and see what it does to the animation (i.e. change the number of dots, the speed slider, the dot colors, and show the dot paths).
(more…)

How Fast Are California Reservoirs Filling Up?

Posted In: Water
Facebooktwittergoogle_plusredditpinterestlinkedinmail

In my previous post, about California water levels, I presented a “bar graph” showing the amount of water currently in California’s reservoirs.  However, I thought it’d be interesting to see how this has changed over the course of the last few months, since the state has gotten alot of rain and snow recently.  I decided to try and “animate” the graph for the current water year (going back to October 1, 2015) showing how the recent El Nino rain has been filling up the reservoirs in California.  Click the “animate” button below the figure and you can use the slider to change the speed of animation as it cycles through the days.   (more…)