Price Tracker – Watch list

The PriceTracker application is mostly complete. It keeps track of products and has become a handy tool, if mostly for keeping my wishlist. I have just added a new “Item Alert” feature to the program. You give the program the name of an author or artist that you like and it will watch for new releases by that creator. Here is what the screen looks like:

Price Tracker

I am starting development of a tool that will track the price of items at Amazon.com. I will build a wishlist of items and the program will check the price of each item daily. It will let me know if the item is on sale and what the current discount is.

There are tools online for doing the same thing, but I’d rather not enter my wishlist into a website and I’d rather not get more email.

Since the program is for my own use, I’ll add items to the tracker by going to Amazon.com, finding the item, and then entering the ASIN into the program.

The program will use Amazon’s Product API to get a bit of product information and the current price.

I am going to write this program in C#. I will be able to re-use quite a bit of code from my MediaDB application which also uses the Amazon Product API.

SimFinance Progress Update

The SimFinance application is mostly done.

As is always the case, the software was more complex than I thought it would be. The main complications were due to the fact that my partner and I aren’t married. So the application had to try to optimize who paid the bills to manage the size of each of our accounts and how much taxes we each had to pay. The other big complication was trying to manage our traditional and Roth IRAs to minimize taxes each year.

There are some big things yet to do:

  1. Come up with a model for stock dividends. Right now, dividends are simply included in the return of the S&P. However, that is not really accurate, as the yield of dividends lags behind changes in stock prices. Also, taxes are due on dividends the year they are paid instead of the year the stock is sold. Those two differences may end up balancing each other out in the overall results.
  2. Investment strategy comparison. Would dividing our money between bonds, i-bonds, and stocks be better overall than having everything in stocks? Does the reduction in volatility pay off? Or is it better to just accept the volatility and maximize returns?
  3. More optimization post 60. The order of IRA withdraws should change after 60. Need to model medicare.

The model is giving us an 85% chance of success right now. I don’t really think that the things that are left to do will change this number significantly. It is surprising how much money we have to have to get a 95% chance of success and how much variation there is in the possible outcomes.

It is possible that treating the S&P 500 as a random distribution is wrong. While the historic data looks random, there probably are some underlying “fundamentals” that keep the stock prices within a range. I am not sure how to add that to the model besides trying to put an overall cap on the market returns.

Student-t distribution for stock returns

I have been working on the SimFinance 2.0 application and have been struggling to find a way to simulate the stock market. (Note: I am not trying to predict the stock market, I just need a way to generate a random stock market return that is similar to historic returns)

My first idea was to use a normal distribution centered around the average return with the same standard deviation that the real data has. This was close to correct, but if I plotted sample returns from history against the normal distribution, the historical returns had much longer tails. Meaning that, in reality, there are more really bad and really good years than there would be in a normal distribution.

After doing some research (I am not the only one interested in simulating the stock market), I found that some people are using a Student-t distribution. After playing with the parameters of that distribution I was able to get a much more realistic curve. Based on the historical data for the S&P 500, I am using the following parameters for the distribution: DOF = 3.40234, SCALE = 35, OFFSET = 0.00725

In software, I am using the boost library to generate random numbers according to the student-t distribution.

SimFinance 2.0

I am starting work on SimFinance 2.0.

A long time ago, I tried to create a retirement analyzer/simulator. It would allow a user to enter everything about their finances, including their plans for the future. It then simulated the future by generating thousands of possible scenarios and displaying your odds of still having money when you die. It built these futures probabalistically based on historic performance of different investment types, the user’s life expectancy, etc. The project was too ambitious and I never completed it.

Now, as I consider retirement, I’d like to have this tool. And I realized that I could complete the project if I would limit the scope to just my own situation. It wouldn’t be useful for other people, but it would give me a better idea if I can really retire.

The old project was created with C++ and wxWidgets. I would like to build the new version in C# because it would be easier to create the user interfaces. But C++ would be faster for simulating thousands of futures month by month. It would also let me re-use some of the code from the original project. So I am going to compromise and build it with C++/CLI. I can use the GUI builder and the .NET libraries and also have the speed of native C++ for the time critical parts of the code.

Practice Log – completed

I have finished the PracticeLog software. Here is what it looks like:

 

I am happy with the software. I created countdown and stopwatch timer modes so that the program will time my practice and automatically update the log for today. I added the “Same as Yesterday” button since I practice a particular set of pieces for at least a week at a time.

I also put in a “10000 hours date” field. This is the date when I will have practiced 10000 hours. I have recently read Outliers by Malcolm Gladwell and am intrigued by the notion that, while talent matters, becoming an expert is mostly a matter of putting in the time practicing.

Practice Log

I am staring work on a new application for my own use. It is called the Practice log and I plan to use it to keep track of the time that I spend practicing violin. When I started violin, the first book contained a paper log where you would fill in your practice time each day and it had a column for your parents to sign off on the entries. When I switched over to the Suzuki books, the books no longer included a paper log. I kept using the paper system for a while, but now I would like to computerize it. I will be able to collect statistics and keep a running total of my hours.

I will keep the paper log format and have a way to add a note and a list of pieces practiced to each day.

I am going to develop this in C# using their DataGridView and a SQLite back end database.

Added board games to the MediaDB

I have added board games to my MediaDB program. I first created the application in java, and then re-wrote it while I was on the Paragon “bench” program. The purpose of the application is to track your personal collection of books, DVDs and now board games. The application originally used Amazon.com’s Product API to fetch item data and an image for books and DVDs in your collection. I have added board games and I am using boardgamegeek.com‘s API to load information and an image for board games.

BoardGameGeek also allows you to track and rate your board games on their web site, so I have added code to download an existing collection, or to upload a collection that you create in the program.