This post was updated on .
I have a script I run from time to time, for identifying stocks to buy. I have used this script to buy 4 stocks: JXN, UNM, MHK, NRG, and C. My returns from these stocks so far are:
JXN: +65% UNM: +204% NRG: +73% MHK: -10% C: -17% All these I bought 2020 or later. JXN I bought some time in 2023. It's hard to give an objective comparison given that I bought these at various dates and I would have to compare it to an index like VOO bought on the same day, which I am too lazy to do, but my feeling is that my stocks that I found with the script have outperformed the market. I ran the script again and here are today's results: APA 0.238930363230378 EMR 0.34294688229919 UAL 0.347293821382611 MOS 0.365476230045442 CMA 0.370747760676478 FMC 0.371983711767222 UA 0.374872989108594 UAA 0.390964516463017 SYF 0.393974159688675 VLO 0.399369145823276 C 0.40719485520534 HOG 0.410726359645161 MTB 0.413865668959643 NOV 0.41969476818303 L 0.42546009904584 ZION 0.446693427888427 APTV 0.451216387874711 ETR 0.454647083039707 F 0.474629296513888 HP 0.476313923724152 ALB 0.478966463714499 RF 0.48100132203567 CINF 0.481241602716483 A number close to 0 means it is undervalued according to my script, a value of 1 means it is fairly values, and a value higher than 1 means it is overvalued. At some point I will research some of these stocks and decide on a few to buy. |
Interesting. Would you mind sharing which metrics/formula you are using? I guess p/e and book value and others? Also do you use yahoo finance for the data?
Several industries do more commonly trade in a low p/e and book ratio close to 1, like banks, energy and shipping due to leverage and/or volatility in revenue. in case you have the old scan data, an alternative way to testing the performance is by checking out the correlation between the script number and the yield after x-time. That will incorporate all of the stocks scanned and not only the selected few. |
In reply to this post by OmegaKV
You happen to do Machine Learning when you are in school? Mind if I ask what books you read, or side projects?
|
In reply to this post by dawis
Yes I only use book value and earnings. The formula I use is:
(Book value of one share) + (Earnings per share)/.07 to calculate the value of a stock, and then I divide this by the stock price. I got data from Yahoo finance, via Python libraries. In the past I used pandas data reader, but lately that has stopped working, so instead I currently use a package called yfinance. It's always a pain to have to update the script to use new interface libraries when the old ones break. I understand there can be some stocks that would not be valued well in this way (e.g. a biotech stock that is making lots of money but whose patent is about to run out), which is why I still think it is a good idea to research a stock before buying. I wouldn't count on the script beating the market without being filtered by human judgement. Nevertheless I do think I have an old run of the script on my computer somewhere and I think it may be interesting how the top stocks of that script performed relative to the market - I will try to calculate this when i have time. |
In reply to this post by Peter
I never studied machine learning.
One tutorial I have been meaning to watch is this video by one of the key people of OpenAI: https://youtu.be/kCc8FmEb1nY He shows how to make a less powerful version of ChatGPT from scratch on your home computer. |
Free forum by Nabble | Edit this page |