JournalThis section of the website has biweekly updates and blog posts concerning the progress of the project.
|
Blog Posts
6/19/19
I had a busy start to the summer, but over the past few days I have been researching the different types of markers that can be used for fundamental analysis. Put simply, fundamental analysis takes the past growth and financial statements and compares it to the company's current respective statuses. I have decided for the program that the "markers" will consist of microeconomic, quantitative conditions. I decided to use these factors because I have spent some time researching which factors can be used to determine wether a long term stock will be good, and the only ones I can implement using only code are fundamental, microeconomic, quantitative factors. My research across a number of sites has led me to use these factors:
- P/E to G (PEG): The ratio is (Price/Earnings)/Estimated Earnings Growth. If the number is low, meaning the estimated growth is bigger than the current P/E, the stock is estimated to grow.
- Dividend Yield: This shows that the company is able to make a decent profit and shows the company is healthy.
- (x)day average price: By comparing average prices in the past X days to the current price, the metric may expose an undervalued stock
- Debt: If a stock is in a lot of debt, this could be a warning sign against investing
- P/B (assets-liabilities)/BVPS(common shareholder's stake after liquidation): If the number is less that one, it shows that the company has a comfortable amount of funds, even enough that common shareholders will have some if the company is liquidated.
I have written each of these factors down, and for the next 6 weeks will be working on learning the code. This information will come back into play once I have learned some code, and can implement these quantitative data metrics into the algorithms.
6/29/19
I have started to dive into the deeper functions of thinkorswim and realized that I can actually outsource a portion of the coding into functions that the program offers. The function aids the code so that instead of implementing a filter to narrow down stocks with markers in healthy ranges, it can weed out undesirable stocks after customizing the function. This means that instead of coding the filter, I can filter then send the filtered stocks into the coded section of the program to be evaluated and eventually to output the data that I want it too. The coding is proving tricky as I am unfamiliar with the language, but I am making slow progress into the different basics of the language. The combination of the coding and the programs built in functions will lessen the amount of coding I have to do, but it really just reallocates that time to other parts of the project. Instead of coding, I have to spend a pretty decent amount of time building filters and toying with filter options so that I can hopefully get what I would have with the code. Another change is that instead of creating one massive algorithm in the code, I almost have to make two smaller ones. The first will be written out and implemented in filters (I haven't decided but I might use Java which I learned in AP Computer science at school to create better filters), and the second is the algorithm in code (which I think will take a lot more time) that determines the values at which the stock should be purchased. This is going to be harder because I am using different metrics for both "sides" of my program, and although the metrics on the "filter" side will be hard to manipulate effectively, I have only user interface to navigate whereas the "selection" side I have to mess with metrics but also dive into the coding to do so. I am hoping to get a lot of work done in the next few days as I am not sure wether I will be busy in late July.
7/10/19
The filter is running well. I am finding it harder to spend time on the program, but progress is still being made at a good rate. Tweaking the filter is a lot harder than I expected. The tweaks have to be so fine, that often I am changing things in the hundredth decimal place. Since I moved part of the algorithm to the filter side, I am moving some of the tweaking I should have done in august to July, and postponing some of the coding some more. The tweaks are difficult to measure if they are successful or not, as the stocks I am filtering are long term investments, and therefor don't change rapidly. I figure that since the tweaks are most of the program, and they are essentially what I am trying to accomplish (getting the right algorithm that works) I won't know wether they work or not. It's just the project, I have to put in what I think works based off of the research and whatever comes out will be my result. I am starting the coding part therefor as I am not sure what more I can tweak without diving fully into actually investing instead of monitoring success.
8/4/19
I got my pilots license today, and for the past two weeks couldn't do any work. I am now getting back into the coding portion so that I can complete the framework of the long term program by the end of summer. The coding is hard to learn because I am essentially using guess and check. There doesn't seem to be a tutorial or anyone making explanation videos on how to set limits for the scanned stocks, so I am trying to mess with commands to find the right ones. It is proving more difficult to navigate through the unknown code to find the things I think I am looking for. I will update now that I have more time.
8/22/19
I have been making some progress with the code. The way that the program is made, I have to code two difference sections of code, one to analyze the stock and evaluate when the stock should be purchased, and the second to notify me when the stock is purchased. I am tweaking the formula for the first part currently, and hope to make it to the second part soon. I am unsure how to pass variables from one section to the other, so I may have to actually read the number from the analysis section and input it to the other section. This will still work but would require that I pay closer attention to the stocks at least once a day. What I am trying to do is pass one variable to a different section so I can have it alert me when the stock crosses my buy price. That way I will be able to have it be constantly updated without me having to do anything. I will report as soon as I dive into the second part, and find out what is possible under the notification code.
8/27/19
Today I finished the long term initial program. The program has room to improve with the addition and tweaking of conditions, but the initial framework of the program is set up. As of today, the program is active. I have also done some brief coding in the alerts tab, and, that is active as well for the current long term stocks. I believe I made good progress this summer, and although the project didn't follow the exact footsteps I planned, it has gotten to the end goal. Instead of the having the entire program be coded into one part of ThinkorSwim, I have used several of the platforms features to reach the goal, using the complex filters to eliminate stocks that I wouldn't be monitoring anyway. Of the two dozen that remained, the program makes it really easy to do a thorough check of each stock in a matter of seconds. This was the ultimate goal, as now I can check the market and use the program to monitor the market with only 5 or 10 minutes at a time. The program hasn't told me to make any trades since I put it online, but I am sure soon it will start to make suggestions. The alert tab will be a good place to start in the fall (although I'll admit it will be more important for the short term program later this year) and can reduce the number of times I have to check the market, meaning now I can spend less time per visit but the alert tab will reduce visits to the platform.
10/30/19
The long term portion of the program has been active and has made approximately $2,000 (10% growth of money invested). I have begun to research short term "markers" that I can use to day trade and take advantage of stock volatility.
11/6/19
Made some great progress today. Looked through the long term watchlists and 4 stocks triggered the program. I am looking into short term filter metrics. I realized I would need a much higher volume for these stocks so I can sell and buy them quickly, I also am looking for high volatility as well. I am stumped however, on what metrics I should use past that. I realize I should still invest in companies that have good returns and no debt, however a lot of quickly growing companies have a number of bad qualities. The long term project is still underway, but I am going to have to spend more time on the research than expected. I need to figure out how to determine what volatility is good volatility, and what could be used to predict jumps in growth.
11/17/19
So far I have accomplished a lot of the work. I have been slightly modifying the long term algorithms and they are doing very well. Initially learning to navigate the platform was not very hard, and neither was learning to use the filters. The difficulty came from trying to learn the code, and also creating the actual algorithms that suggest a "buypoint". The successes have usually come in big breaks, for example, for almost a week I couldn't get the code to work, but after figuring out how the syntax of "double" variables worked I made a ton of progress. The challenges have mostly been time constraints, for example a lot of the time I have to work, after school and on the weekends, the stock market is closed. Another issue is the Severn's wifi is so bad that I am often unable to get current prices and/or load my program. Despite the difficulties, I am very happy with and proud of the program.
Going forward, my project doesn't need additional any materials or resources because it is all online. I have to research short term metrics for about two more weeks. Starting December I will begin filtering using short term metrics. Coding should happen starting around the end of exams. This schedule is ambitious, but if I can complete it, then both programs have a month to be tweaked and modified before February, allowing both programs to be modified for a month and run for a month together. I am expecting delays, so this timeline has approximately a 3 week cushion in case I get behind.
1/9/2020
I mostly completed what I wanted to on winter break. I did some more research on what metrics I should be using for the short term algorithm, and created filters based off of the idea. I originally was having trouble finding good yet volatile stocks, and considered only searching within the energy and financial sectors, but found that when I applied the filter to the entire market, only energy, financial and some medical stocks came up anyways. The filter took a lot of tweaking, and in the future I have some plans to open another filter for bearish volatile stocks. The algorithm was actually fairly simple to conceptualize, but it took more time than expected to search the internet for the variables I wanted to use, and how to use them. The algorithm detects changes in the predicted slope of the stock, over a certain number of "bars" or time period. I can modify how much time is used, and I have been changing it slightly to make user interface easier, as smaller time periods make reading the lightning fast algorithm only possible on red bull and vivance. I discovered after a lot of trying, that automated trading is not possible on ThinkorSwim, but volatility trading is as long as I am on the program. This is slightly disappointing as it means that volatility trading has to be done while I am there. Overall, I accomplished a lot over the break, and have some ideas for the future. I have 1 month to finalize the filters and code for the volatility portion, and I would like to try some more complicated slope calculations, however I am not sure if they are possible. I look forward to sitting down to test the volatility section for a decent portion of time. In other news the long term program has been doing very well with a 22% return as of December, which is extremely high for blue-chip stocks.
2/25/20
Disaster struck. The coronavirus wiped out all my profits. Meaning, I am back to where I started. I pray that the market resurges by the time I have to present. I am not going to sell because they seemed to have leveled off since the drop-off this morning (which I hadn't seen until tonight). I might have to start working asap on a coronavirus filter because this is truly terrible for the project. What unfortunate timing. I have decided to sell all the stocks and wait for the market to rebound.
3/4/2020
The market seems to be coming back, as the algorithm has become very active today. I have invested in 3 stocks in the past hour and a half, and am hoping to continue to ride the resurgence for the next few days. I calculated the losses after selling on Tuesday (2/25). On Friday the week before, I was at about a $5,400 return on a $36,600 investment which is a 14.7% return. Monday and until I sold on Tuesday, the $5,400 was lost and I went about $500 into the red. I am going to have to be very active in order to try and recoup some of these losses and returning to breaking even is my goal at the moment. In order to do so, I will have to be extremely vigilant of the market and hopefully make some profits back. This is such unfortunate timing, because the 14% return looked very nice and it was all going well for the project. I understand that the market suffers shocks and that investors need to be ready for them however the algorithm is simply taking data inputs so I can't be disappointed in the project because it was doing what it was programmed exactly to do, which as the programmer I definitely didn't install any anti-virus software.
3/14/2020
I really need to be alert over the break in order to try and make back those profits. I am currently waiting for some of the stocks to trigger the algorithm, however so far only 2 have done so. The program weeds out high volatility, and those that aren't facing high volatility are slowly declining. It's a waiting game now, and I am going to have to be vigilant this break so I can catch the return if it happens. While I am waiting, I am going to try and restructure the code on the short term because I took a look at it yesterday and it is kind of sloppy. So goals are to use this time at home to watch carefully and also restructure the short term code.
5/4/2020
The coronavirus has disrupted my project pretty thoroughly. The main goal of the project was to find and invest in long term blue chip stocks that were meant to be held for a number of years, this has obviously been disrupted by the coronavirus as many of the long term stocks that have been growing steadily for more than a decade took dives to below where they were from when I began to invest. The sectors I was invested in for the long term algorithm fell by 15-20% from where I began. As you can imagine, this is bad for long term investments where I am supposed to buy in and let them ride for many years. This crash ruined the results of the algorithm as without slow long term growth, not only were the stocks I invested in ruined, the rapid growth and spiking volatility in the past month hasn't allowed the algorithm to select "safe" stocks as any of the old stocks were spiking too hard to be considered safe, slow growth stocks. I still have the data and numbers from a few days before February 25th (a significant date I will go into later) so that will have to serve as the indicator for how the program did. The short term part of the algorithm has been working well. It requires a significant amount of time and energy as I have to sit and watch the screen all day for the indicators to switch, but the several days I have sat down for several hours and traded it made approximately 2% a day, which if sat on every day, could see a doubling time of less than two months. I am continuing to test now that I am out of school and have more hours during the opening of the market. I believe it has proven itself over these past few sessions but it has to be understood that this type of day trading is like a full time job, it has to be monitored constantly for hours. The result of Covid is reducing my timeline to 6 months for the long term as the project can't function during a bear market of this magnitude. In order to respond the the virus, I am tweaking the short term and changing the focused sectors because volatility is everywhere, not tied to specific sectors or kinds of stocks, so that research is still being done.
I had a busy start to the summer, but over the past few days I have been researching the different types of markers that can be used for fundamental analysis. Put simply, fundamental analysis takes the past growth and financial statements and compares it to the company's current respective statuses. I have decided for the program that the "markers" will consist of microeconomic, quantitative conditions. I decided to use these factors because I have spent some time researching which factors can be used to determine wether a long term stock will be good, and the only ones I can implement using only code are fundamental, microeconomic, quantitative factors. My research across a number of sites has led me to use these factors:
- P/E to G (PEG): The ratio is (Price/Earnings)/Estimated Earnings Growth. If the number is low, meaning the estimated growth is bigger than the current P/E, the stock is estimated to grow.
- Dividend Yield: This shows that the company is able to make a decent profit and shows the company is healthy.
- (x)day average price: By comparing average prices in the past X days to the current price, the metric may expose an undervalued stock
- Debt: If a stock is in a lot of debt, this could be a warning sign against investing
- P/B (assets-liabilities)/BVPS(common shareholder's stake after liquidation): If the number is less that one, it shows that the company has a comfortable amount of funds, even enough that common shareholders will have some if the company is liquidated.
I have written each of these factors down, and for the next 6 weeks will be working on learning the code. This information will come back into play once I have learned some code, and can implement these quantitative data metrics into the algorithms.
6/29/19
I have started to dive into the deeper functions of thinkorswim and realized that I can actually outsource a portion of the coding into functions that the program offers. The function aids the code so that instead of implementing a filter to narrow down stocks with markers in healthy ranges, it can weed out undesirable stocks after customizing the function. This means that instead of coding the filter, I can filter then send the filtered stocks into the coded section of the program to be evaluated and eventually to output the data that I want it too. The coding is proving tricky as I am unfamiliar with the language, but I am making slow progress into the different basics of the language. The combination of the coding and the programs built in functions will lessen the amount of coding I have to do, but it really just reallocates that time to other parts of the project. Instead of coding, I have to spend a pretty decent amount of time building filters and toying with filter options so that I can hopefully get what I would have with the code. Another change is that instead of creating one massive algorithm in the code, I almost have to make two smaller ones. The first will be written out and implemented in filters (I haven't decided but I might use Java which I learned in AP Computer science at school to create better filters), and the second is the algorithm in code (which I think will take a lot more time) that determines the values at which the stock should be purchased. This is going to be harder because I am using different metrics for both "sides" of my program, and although the metrics on the "filter" side will be hard to manipulate effectively, I have only user interface to navigate whereas the "selection" side I have to mess with metrics but also dive into the coding to do so. I am hoping to get a lot of work done in the next few days as I am not sure wether I will be busy in late July.
7/10/19
The filter is running well. I am finding it harder to spend time on the program, but progress is still being made at a good rate. Tweaking the filter is a lot harder than I expected. The tweaks have to be so fine, that often I am changing things in the hundredth decimal place. Since I moved part of the algorithm to the filter side, I am moving some of the tweaking I should have done in august to July, and postponing some of the coding some more. The tweaks are difficult to measure if they are successful or not, as the stocks I am filtering are long term investments, and therefor don't change rapidly. I figure that since the tweaks are most of the program, and they are essentially what I am trying to accomplish (getting the right algorithm that works) I won't know wether they work or not. It's just the project, I have to put in what I think works based off of the research and whatever comes out will be my result. I am starting the coding part therefor as I am not sure what more I can tweak without diving fully into actually investing instead of monitoring success.
8/4/19
I got my pilots license today, and for the past two weeks couldn't do any work. I am now getting back into the coding portion so that I can complete the framework of the long term program by the end of summer. The coding is hard to learn because I am essentially using guess and check. There doesn't seem to be a tutorial or anyone making explanation videos on how to set limits for the scanned stocks, so I am trying to mess with commands to find the right ones. It is proving more difficult to navigate through the unknown code to find the things I think I am looking for. I will update now that I have more time.
8/22/19
I have been making some progress with the code. The way that the program is made, I have to code two difference sections of code, one to analyze the stock and evaluate when the stock should be purchased, and the second to notify me when the stock is purchased. I am tweaking the formula for the first part currently, and hope to make it to the second part soon. I am unsure how to pass variables from one section to the other, so I may have to actually read the number from the analysis section and input it to the other section. This will still work but would require that I pay closer attention to the stocks at least once a day. What I am trying to do is pass one variable to a different section so I can have it alert me when the stock crosses my buy price. That way I will be able to have it be constantly updated without me having to do anything. I will report as soon as I dive into the second part, and find out what is possible under the notification code.
8/27/19
Today I finished the long term initial program. The program has room to improve with the addition and tweaking of conditions, but the initial framework of the program is set up. As of today, the program is active. I have also done some brief coding in the alerts tab, and, that is active as well for the current long term stocks. I believe I made good progress this summer, and although the project didn't follow the exact footsteps I planned, it has gotten to the end goal. Instead of the having the entire program be coded into one part of ThinkorSwim, I have used several of the platforms features to reach the goal, using the complex filters to eliminate stocks that I wouldn't be monitoring anyway. Of the two dozen that remained, the program makes it really easy to do a thorough check of each stock in a matter of seconds. This was the ultimate goal, as now I can check the market and use the program to monitor the market with only 5 or 10 minutes at a time. The program hasn't told me to make any trades since I put it online, but I am sure soon it will start to make suggestions. The alert tab will be a good place to start in the fall (although I'll admit it will be more important for the short term program later this year) and can reduce the number of times I have to check the market, meaning now I can spend less time per visit but the alert tab will reduce visits to the platform.
10/30/19
The long term portion of the program has been active and has made approximately $2,000 (10% growth of money invested). I have begun to research short term "markers" that I can use to day trade and take advantage of stock volatility.
11/6/19
Made some great progress today. Looked through the long term watchlists and 4 stocks triggered the program. I am looking into short term filter metrics. I realized I would need a much higher volume for these stocks so I can sell and buy them quickly, I also am looking for high volatility as well. I am stumped however, on what metrics I should use past that. I realize I should still invest in companies that have good returns and no debt, however a lot of quickly growing companies have a number of bad qualities. The long term project is still underway, but I am going to have to spend more time on the research than expected. I need to figure out how to determine what volatility is good volatility, and what could be used to predict jumps in growth.
11/17/19
So far I have accomplished a lot of the work. I have been slightly modifying the long term algorithms and they are doing very well. Initially learning to navigate the platform was not very hard, and neither was learning to use the filters. The difficulty came from trying to learn the code, and also creating the actual algorithms that suggest a "buypoint". The successes have usually come in big breaks, for example, for almost a week I couldn't get the code to work, but after figuring out how the syntax of "double" variables worked I made a ton of progress. The challenges have mostly been time constraints, for example a lot of the time I have to work, after school and on the weekends, the stock market is closed. Another issue is the Severn's wifi is so bad that I am often unable to get current prices and/or load my program. Despite the difficulties, I am very happy with and proud of the program.
Going forward, my project doesn't need additional any materials or resources because it is all online. I have to research short term metrics for about two more weeks. Starting December I will begin filtering using short term metrics. Coding should happen starting around the end of exams. This schedule is ambitious, but if I can complete it, then both programs have a month to be tweaked and modified before February, allowing both programs to be modified for a month and run for a month together. I am expecting delays, so this timeline has approximately a 3 week cushion in case I get behind.
1/9/2020
I mostly completed what I wanted to on winter break. I did some more research on what metrics I should be using for the short term algorithm, and created filters based off of the idea. I originally was having trouble finding good yet volatile stocks, and considered only searching within the energy and financial sectors, but found that when I applied the filter to the entire market, only energy, financial and some medical stocks came up anyways. The filter took a lot of tweaking, and in the future I have some plans to open another filter for bearish volatile stocks. The algorithm was actually fairly simple to conceptualize, but it took more time than expected to search the internet for the variables I wanted to use, and how to use them. The algorithm detects changes in the predicted slope of the stock, over a certain number of "bars" or time period. I can modify how much time is used, and I have been changing it slightly to make user interface easier, as smaller time periods make reading the lightning fast algorithm only possible on red bull and vivance. I discovered after a lot of trying, that automated trading is not possible on ThinkorSwim, but volatility trading is as long as I am on the program. This is slightly disappointing as it means that volatility trading has to be done while I am there. Overall, I accomplished a lot over the break, and have some ideas for the future. I have 1 month to finalize the filters and code for the volatility portion, and I would like to try some more complicated slope calculations, however I am not sure if they are possible. I look forward to sitting down to test the volatility section for a decent portion of time. In other news the long term program has been doing very well with a 22% return as of December, which is extremely high for blue-chip stocks.
2/25/20
Disaster struck. The coronavirus wiped out all my profits. Meaning, I am back to where I started. I pray that the market resurges by the time I have to present. I am not going to sell because they seemed to have leveled off since the drop-off this morning (which I hadn't seen until tonight). I might have to start working asap on a coronavirus filter because this is truly terrible for the project. What unfortunate timing. I have decided to sell all the stocks and wait for the market to rebound.
3/4/2020
The market seems to be coming back, as the algorithm has become very active today. I have invested in 3 stocks in the past hour and a half, and am hoping to continue to ride the resurgence for the next few days. I calculated the losses after selling on Tuesday (2/25). On Friday the week before, I was at about a $5,400 return on a $36,600 investment which is a 14.7% return. Monday and until I sold on Tuesday, the $5,400 was lost and I went about $500 into the red. I am going to have to be very active in order to try and recoup some of these losses and returning to breaking even is my goal at the moment. In order to do so, I will have to be extremely vigilant of the market and hopefully make some profits back. This is such unfortunate timing, because the 14% return looked very nice and it was all going well for the project. I understand that the market suffers shocks and that investors need to be ready for them however the algorithm is simply taking data inputs so I can't be disappointed in the project because it was doing what it was programmed exactly to do, which as the programmer I definitely didn't install any anti-virus software.
3/14/2020
I really need to be alert over the break in order to try and make back those profits. I am currently waiting for some of the stocks to trigger the algorithm, however so far only 2 have done so. The program weeds out high volatility, and those that aren't facing high volatility are slowly declining. It's a waiting game now, and I am going to have to be vigilant this break so I can catch the return if it happens. While I am waiting, I am going to try and restructure the code on the short term because I took a look at it yesterday and it is kind of sloppy. So goals are to use this time at home to watch carefully and also restructure the short term code.
5/4/2020
The coronavirus has disrupted my project pretty thoroughly. The main goal of the project was to find and invest in long term blue chip stocks that were meant to be held for a number of years, this has obviously been disrupted by the coronavirus as many of the long term stocks that have been growing steadily for more than a decade took dives to below where they were from when I began to invest. The sectors I was invested in for the long term algorithm fell by 15-20% from where I began. As you can imagine, this is bad for long term investments where I am supposed to buy in and let them ride for many years. This crash ruined the results of the algorithm as without slow long term growth, not only were the stocks I invested in ruined, the rapid growth and spiking volatility in the past month hasn't allowed the algorithm to select "safe" stocks as any of the old stocks were spiking too hard to be considered safe, slow growth stocks. I still have the data and numbers from a few days before February 25th (a significant date I will go into later) so that will have to serve as the indicator for how the program did. The short term part of the algorithm has been working well. It requires a significant amount of time and energy as I have to sit and watch the screen all day for the indicators to switch, but the several days I have sat down for several hours and traded it made approximately 2% a day, which if sat on every day, could see a doubling time of less than two months. I am continuing to test now that I am out of school and have more hours during the opening of the market. I believe it has proven itself over these past few sessions but it has to be understood that this type of day trading is like a full time job, it has to be monitored constantly for hours. The result of Covid is reducing my timeline to 6 months for the long term as the project can't function during a bear market of this magnitude. In order to respond the the virus, I am tweaking the short term and changing the focused sectors because volatility is everywhere, not tied to specific sectors or kinds of stocks, so that research is still being done.
The Team
Benjamin Damon
