Semester 2 Summary

This semester I started to try and make a portfolio risk management application in the same manner as the natural language application I did last semester. I started by researching about current methods used for portfolio management in R and how they could be used to optimize a portfolio. I decided that the main theory I wanted to focus on was the Modern portfolio Theory developed by Harry Markowitz, this plots the risk of an investment against the expected rate of return. However, I ran into some problems when developing the application relating to using real time data in the application.

I then turned to learning about different uses of data science in finance, primarily in three areas: Portfolio Management, Pairs Trading, and Econometrics. Of the three, I was most familiar with econometrics since I had taken some classes on the subject previously. I started experimenting with the three subjects and wrote down the things that I did (that worked) in a script. Most of the things I did were graphs and analysis on hypothetical scenarios in a selected time frame since dealing with live data is more difficult.

Towards the end of the semester I started to look into other dana science tools that relate to finance and I stumbled upon the Wolfram Language. I used the free cloud interface to try out if it is something that I would want to use in the future and I was very impressed with the features. Overall this semester was quite informative.


Week 22 Wednesday


I was absent due to the AP English Language & Composition and AP Statistics exams.


Week 22 Monday


I was absent due to the AP Biology and AP Physics C exams.


Week 21 Summary

This week, I spent my time running example programs and trying to adapt them to learn how I could use it in a single program. The examples I found that were most helpful came from the official RStudio forums and "The R Trader," a personal blog.


Week 21 Friday


I recreated a simple stock ticker app with the quant mod package that pulls information from yahoo's databases and rearranges the axes toy our liking.


Week 21 Wednesday


I was absent from school today.


Week 21 Monday


Today I read some of the articles by "The R Trader". The article I focused primarily on is the one that looks as risk as a survival variable as well as factor variables. There are some great examples of his code on the blog.


Week 20 Summary

This week I continued working on Pairs Trading for the project. I also explored the Wolfram Language's offerings in the field of Data Science/Finance and compared it to other solutions out there such as MATLAB. The symbolic base of Wolfram Language seems to be very beneficial for econometric studies and it's something I might want to use in the future.


Week 20 Friday


Today I continued to explore Wolfram's Financial Risk Management solutions and the programming cloud. I also continued on working on my project in R, primarily the Pairs Trading aspect.


Week 20 Wednesday


Today I experimented with the Wolfram Language Programming Cloud to see if it is something I might want to get into int he future. The visualization aspect of the Wolfram Language is very easy to use as opposed to the ones in R (which has 3 main types and are all either tedious to use or limited). The symbolic nature of Wolfram Language also makes it easier to deal with mathematical computations. I am waiting for the Data Science platform to be released, but the programming cloud (the free tier) seems very impressive to me.


Week 20 Monday


Today I followed a workshop in R about weighting options and did created some charts on the portfolio. This helped visualize which stocks were the most risky in the portfolio.


Week 19 Summary


This week was spent working on market neutral strategies as well as improving the predictions overall. Recent events in the US economy has had some impact with the foreign market. Also, company earnings seasons has passed and the market is readjusting to the changes.


Week 19 Friday

Today I did some portfolio return analysis with the pairs trading and market neutral strategies. I also researched the potential impacts of the strong dollar/low oil prices to update my estimates regarding the foreign exports of this country and how that will affect projected forecasts.


Week 19 Wednesday


Today I did some linear regression analysis and trading pairs spread modeling. This was a simple experiment with the market neutral strategy that benefits from statistical arbitrage, meaning that you can make a profit no matter the trend of the market. Nowadays, there are some laws that prevent short term trading practices like these from happening.


Week 19 Monday


I was sick and unable to go to school today.


Week 18 Summary


This week was spent mainly working on the app itself and optimizing the programs. I also looked at a lot of resources for help and direction such as Stack Exchange and apps created by other people on the Shiny server.

1 comment

Week 18 Friday


I was looking at my application on the Shiny server when I saw a similar app that had a lot of features but in. I spent today trying to reverse engineer the code used to calculate their results.

Looking at someone else's app really helped me develop my own app. The UI and the constraints they used were really useful.


Week 18 Wednesday


Today I did some corrections for the trading price ratios, this will improve the portfolio's ability to calculate annual rate of returns and projected values. I had to look up help for this on the stack exchange forum under the R in Finance subsection. There I also found implementation of Z scores in financial models.


Week 18 Monday


Today I played around with data transformation in R. I did a little work on the portfolio file to clean up the data for future work and make it easier to load into the model.


Week 17 Summary

This week was spent working on my reformatted project in R. I chose to keep most of my project simple so that it would run faster on a shiny server.