Hi d_vox,
For the client case, the most basic criteria are the client’s age and appetite for risk. In general, you’d assume younger people should take on more risk as they have a longer time horizon to realize returns, to wait out long periods of market under performance, and even to make new money again when they lose some in the market. The important point is that higher risk should equate to higher returns. Combine that with a long time horizon and the investment portfolio can grow substantially. Older people do not have those attributes so should favor lower risk investments and portfolios.
In finance, the measure of risk that is typically used is volatility. Which simply means how much a stock changes from period to period (the course uses daily change, but you could look at a stock’s monthly change when you have many years of data). That’s where variance and standard deviation come in. They are basic measures of volatility and, therefore, risk. By this measure, the least risky security would be a treasury bond while the most risky would be an individual stock with a lot of volatility. Generally, investors expect higher returns from high risk stocks.
Another almost axiomatic concept in finance is that a diversified portfolio reduces risk relative to return. That requires a lot of words to explain. If you have not encountered that idea before, you can find some really good explanations with a Google search. Even better, ask ChatGPT to explain it.
Regarding selecting stocks, I manage some fairly large portfolios, so I’m looking at individual stocks, market data, and economic data regularly. To be honest, I got the stock ideas from what looks interesting to me personally. I also sort of deliberately chose some stocks that would be well known to most people and had some sex appeal, combined with some “boring” options… I already pretty much knew the risk vs return picture of those stocks, so I could select a mixed bag. I have access to reams of data from my brokerage. If you have a brokerage account, you can probably get this sort of data. If not, Yahoo Finance has pretty much everything you’d need.
Since some time has gone by since I performed this project, you can see that there was definitely no magic in the choices! Some have had nice returns since November 2023. Nvidia has done great. Amazon and Google have performed nicely. The S&P 500 over all has had a nice run. But Tesla and Boeing have been hammered lately!
Perhaps a good approach for you would be to look at the S&P500 sector leaders and choose those with the lowest PEG ratios. PEG ratios are not a perfect measure - there are no perfect measures - but it’s a good place to start. Then throw in one or two high flyers.
Be aware that the functions return_portfolios
and optimal_porfilios
that were made by Codecademy are heavily biased towards higher risk stocks (high volatility … meaning highly standard deviation). Those functions will result in most of the weightings going towards the stocks with the highest expected returns. I didn’t have several hours to completely re-build them, but I made some changes so that they provide a wider spread of portfolio weightings. Even my adjusted versions of those functions are still somewhat biased.
I hope that helps! Good luck with the project. It’s a good learning experience.