Five years ago I become very interested in the stock market the idea of putting money into something and it growing is one of the most fascinating things to me. It made me want to know more, so I started to learn more, mostly in the wrong places at first. Eventually though I found resources like the MIT Opencourseware, Stanford Opencourse, and Khan Academy being some of my favorite. This later influenced my decisions to transfer and change studies to finance and political science. In what I consider a short time studying finance and investing I’ve noticed one thing has become certain. People are interested in investing, people are afraid of investing, and if you aren’t afraid of investing than you are probably ill informed on investing. This project will string together everything I have learned both inside my major and outside.
This left me with some questions. Can anyone really be a successful investor? Probably not. Can anyone be informed enough to make a smart investment decision? Probably yes. Do you have to study finance to be a successful investor or a degree at all? No. Is the information needed to make a smart investment decision easily available to everyone? Not really. This lead me to create a universal financial model I guess I would call it in excel. Someone could put in financial information from SEC.gov create their own forecasts, portfolios, weights, and level of risk aversion. What I was making is very similar to a robo-advisor that invests money for you, except you were the advisor, and a very inefficient one at that. This lead me to start learning computer programming starting off with R and just barely scraping the surface in Python and SQL. This gave me a new outlook on how to answer previous questions and influenced many new questions.
Creating a Website
The best way to share my idea is through PowerPoint as if I were pitching it to someone. So I created this PowerPoint to view and will go through parts of it on here. I can only get so much done in one semester on a project that I have no idea how long it would ever realistically take me to complete. So I decided to start coding static pages that later I could maybe turn into apps or maybe even the static pages alone could be useful as my applied project. I also started collecting all of my ideas and putting them into the above PowerPoint which is another main part of my project that gives an answer to the impact and importance of this project. Pictured below to the left is a company profile of Alexion Pharmaceuticals from Marketline Advantage. The profile is missing some useful information an investor would most likely want to know about the company. I noticed even more
useful missing info when I looked at other company profiles. I started to code some of the parts of the website in static pages creating my own functions in R. The first is an income statement from GOOGLE. I then used some of the packages provided by the R community to make a shorter more efficient code of the GOOGLE income statement. Before I was manually entering the income statement, using the second code R fetches the data for me. I then started to create static charts using various R packages again making the code much more efficient. Here are some of the codes that I adjusted from the text Mastering R for Quantitative Finance. This allows R to fetch data and plot charts with only a few lines of code as well as do a dickey fuller test. Here is another example of R doing even more complex analysis in only a few lines of code from a final exam I had last semester. R allows you to knit your codes in html format using R markdown. Here is an essay I had to do this semester that I then recreated in R markdown to show just how easy it is to create simple webpages with information. I can format this even better in R markdown and make it look even more similar to say information on Marketline Advantage. However creating my own company profile would be time consuming. I would have to manually type hundreds of words for every company, this problem can be solved by using web scraping most likely with python instead of R. It will allow me to scrape information I’ve selected off of web pages such at 10-K and 10-Q financials provided by SEC.gov. The reason I didn’t start putting all of these codes together and make my own webpages is because a lot of this information isn’t as useful in a static form.
This is when R shiny comes into play, for the most part the static graphics I created can be made interactive and adjustable in R shiny. I’ve spent a lot of time reading and practicing in shiny, though I don’t have much to show from it. Thanks to github.com‘s great community I was not only able to talk with people who have made some amazing things in R, I was also able to get the code they used to create these apps. I contacted Alex Petralia through email and got some insight on the fama french application he made here. Doing an analysis like this would take someone who is very skilled in excel a long time, let alone someone with no skills at all. Here is an app I started to adjust that implements much of the static work I made above in R markdown. Simply hit Get Stock and add whatever technical analysis you want to apply.
Future Direction and Ultimate Purpose
By now if you have kept up with the PowerPoint I’ve started to enter into the first two slides of information. Time permitting I can pretty easily do everything talked about in the slides. To the left you can see the third slide.
However the information covered in these two slides are just the bare minimum of what a useful financial data website would need. The rest of the slides do justice to explain the importance and impact of my applied project.
The ultimate goal of this is to create a free open platform to share financial, statistical, computational, and any other kinds of models one might make to invest. There are other websites that currently do some parts of this, Quantopian and Github. These are almost entirely focused on coding though, no website looks at sharing excel documents for financial analysis or is even entirely focused on finance and investing. The next innovation I think this can bring is by not only providing financial data to a user but also alternative investment data. One of the main assumptions of this projects success is that it will have a large number of users. Without users some of the other parts of the project outlined in the PowerPoint are not achievable. Regardless this project is capable of providing all of the basic needs of a financial data website. R shiny allows for complex models to be done and repeated with ease. Users can share their work, meet like minded investors, and learn from successful investors. Bringing financial literacy to anyone that wants to learn and slowing down the process of the investment decision. My major assessment of this project is that I wish I had started sooner and wish I already had a complete understanding of computer programming. I often times found myself writing out code that I didn’t need to do or would be better off doing in another language. R has so many different packages that save countless hours of time if you use them, but it also takes time to find these packages, and learn them. Programming is constantly changing and for someone just learning you have to learn the old information and keep up with the new information happening right in front of you which is the most challenging part of it. There are significant challenges in completing this project after I graduate, but ultimately I’d like to have a positive impact on the world due to my education and this is a start.