Posts

Showing posts from December, 2012

Wrapped up Udacity's: Introduction to Computer Science

Image
AKA CS101
Building a Search Engine
I finally got around finishing the exams for this course. And what a ride it has been. This is definitely one of the best online courses for learning about computer science and not just programming in one specific language (the course uses Python).
One of the concluding videos of the course explains this nicely as well as talking about where to go from here.

Bash script calculating sharpratios on Yahoo Finance data

Image
For one of my trading projects I am looking to calculate something called sharpratio for pricing of an equity over time. This can be done in a spreadsheet, but this becomes a bit laborious as I want to do this for more than 1000 of data sets. So I set out to write a bash script that calculates the sharpratio on any given price data set from Yahoo Finance. If you are interested in how I use this as part of a trading strategy. I will be posting there shortly on how I intend to use below code as part of the trading strategy I use. More info on the theory of sharpratio can be found here.

Here is what the code does:
It reads in a price data file that you can get from Yahoo Finance. The script will run through the file and will calculate the price difference for each trading day from adjusted close to adjusted close the other day. It will also calculate the absolute return made since the starting date of the data set. Then at the end it will calculate the average of the daily differences, …