AI Investor Classic Github Code
AI Investor International Github Code
Email: Ai_Investor@protonmail.com
Facebook: theinvestingai
Twitter:
Follow @TheAIInvestor
Return Since Inception: | 57.5% |
Portfolio Daily Volatility: | 0.035 |
S&P500 Return: | 50.7% |
S&P500 Daily Volatility: | 0.017 |
π
The A.I. stock picker selects 7 stocks every March
from the NYSE/NASDAQ
β The fund equally weights these stocks in the
portfolio
β² The strategy holds these stocks for 1 year with
no further transactions
π Refresh the portfolio in March every year
(Sell all and buy new stock picks)
The A.I. Investor classic is probably the simplest way to pick stocks with Machine Learning. So simple in fact that anyone should be able to code it up themselves (with a bit of study). To that end I wrote a book that people can follow to build their own A.I. Investor.
Nothing is hidden here. This is a simple Robo-Investor where you can see all of the code. The portfolio performance may or may not do well over time, though at least you can see how the A.I. Investor works and can tweak and tinker with it as you like if you coded it yourself.
The book Build Your Own A.I. Investor teaches Python programming, Machine Learning, and the basics of long-term stock investing all in a single code project where you get to program the A.I. Investor yourself.
If that's too daunting, you can always just follow the portfolios that the A.I. outputs, at your own risk.
Requires data subscription from Simfin.com for present day stock seleciton. To do all tutorials and problems a free account works fine.
It might not. The aim here is to pick stocks based on their fundamental figures with Machine Learning, with the underlying approach coming from a Value Investing background-though only from a quantitative perspective.
Some rudimentary backtesting was done, with a margin of safety that should convincingly prove that at the very least it would have worked in the past. Markets themselves change a lot over time, and past performance doesn't truly prove future performance.
The A.I. Investor doesn't optimise for volatility, it instead trys to pick stocks based on the quantitative fundamentals and holds them for a long time (1 year). This kind of investment strategy will turn away most investors, so it's not as if the market is full of competitors using the same Machine Learning strategies.
There are always risks, and relative to the market average we can't all be winners. At least the stocks picked are few, such that anyone should have time to do their own due-diligence by reading the company financial reports and getting to know the business they are buying equity in.
Generally speaking, the A.I. Investor picks stocks that are trading too cheaply relative to metrics such as their book value, return on equity, etc. Over time this should lead to outperformance.
This portfolio will crash too.
2020 Holdings Mar 2020-Mar 2021 | 2021 Holdings Mar 2021-Onwards |
---|---|
JBHT | NWL |
EPZM | GLYC |
NOW | MAR |
LNT | TRUP |
RFP | BKD |
GPRE | AFI |
MA | CMLS |
Seven stocks are chosen in March every year when the annual reports are released, so that the financial data can be analysed to select the best stocks. These stocks are then held for a year, with no additional trading to re-weight the portfolio.
Because of this, some stock positions will become a larger part of the portfolio over time, see the pie chart for the current fund positioning.
Stock Exchange | Ticker | Company Name | What They Do |
---|---|---|---|
NYSE | NWL | Newell Brands Inc. | Consumer goods |
NYSE | GLYC | GlycoMimetics Inc. | Glycomimetic drugs |
NYSE | MAR | Marriott International Inc. | Hotels |
NYSE | TRUP | Trupanion Inc. | Pet insurance |
NYSE | BKD | Brookdale Senior Living Inc. | Old people homes |
NYSE | AFI | Armstrong Flooring Inc. | Flooring |
NYSE | CMLS | Cumulus Media Inc. | Radio |
Return Since Inception: | -26.6% |
Portfolio Daily Volatility: | 0.015 |
S&P500 Return: | -1.6% |
S&P500 Daily Volatility: | 0.011 |
π
The A.I. stock picker selects 10 stocks every year
from the NYSE/NASDAQ
β The fund equally weights these stocks in the
portfolio
β² The strategy holds these stocks for 1 year with
no further transactions
π Refresh the portfolio in May every year
(Sell all and buy new stock picks)
This A.I. Investor works on international stocks, taking data from EODHistoricalData.com to build on the classic A.I. Investor, with 10x more data and almost 50 stock exchanges to select stocks from. Nothing is hidden here. This is a Robo-Investor where you can see all of the code, a little more complex than the classic A.I. Investor, but using the same principles, and with the book describing every concept used behind the A.I..
The portfolio performance may or may not do well over time, though at least you can see how the A.I. Investor works and can tweak and tinker with it as you like if you coded it yourself.
The book International Build Your Own A.I. Investor Machine Learning and long-term stock investing all in a single code project where you get to program the A.I. Investor yourself.
If that's too daunting, you can always just follow the portfolios that the A.I. outputs, at your own risk.
Requires data subscription from eodhistoricaldata.com.
It might not. The aim here is to pick stocks based on their fundamental figures with Machine Learning, with the underlying approach coming from a Value Investing background-though only from a quantitative perspective.
Some rudimentary backtesting was done, with a margin of safety that should convincingly prove that at the very least it would have worked in the past. Markets themselves change a lot over time, and past performance doesn't truly prove future performance.
The A.I. Investor doesn't optimise for volatility, it instead trys to pick stocks based on the quantitative fundamentals and holds them for a long time (1 year). This kind of investment strategy will turn away most investors, so it's not as if the market is full of competitors using the same strategies.
There are always risks, and relative to the market average we can't all be winners. At least the stocks picked are few, such that anyone should have time to do their own due-diligence by reading the company financial reports and getting to know the business they are buying equity in.
Generally speaking, the A.I. Investor picks stocks that are trading too cheaply relative to metrics such as their book value, return on equity, etc. Over time this should lead to outperformance.
This portfolio will crash too.
Ten stocks are chosen in May every year, taking data from the annual reports for the previous year, so that the financial data can be compared between stocks to select the best. These stocks are then held for a year, with no additional trading to re-weight the portfolio.
Because of this, some stock positions will become a larger part of the portfolio over time, see the pie chart for the current fund positioning.
Stock Exchange | Ticker | Company Name | What They Do |
---|---|---|---|
NYSE | SNEX | StoneX Group Inc. | Financial Services |
NYSE | BVH | Bluegreen Vacations Holding Corporation | Timeshare Property |
NYSE | FOSL | Fossil Group Inc | Fasion Designer |
NYSE | FNCH | Finch Therapeutics Group Inc. | Biotech |
NYSE | MLR | Miller Industries Inc. | Recovery Equiptment Manufacture |
NYSE | IEA | Infrastructure and Energy Alternatives Inc. | Civil Construction |
NYSE | WDH | Waterdrop Inc. | Medical insurance |
NYSE | ENLC | EnLink Midstream | Natural Gas Transmission |
NYSE | ALR | Five Star Senior Living Inc. | Old Peoples Homes |
NYSE | EAR | Eargo Inc. | Hearingaid Startup |
Return Since Inception: | -22.1% |
Portfolio Daily Volatility: | 0.015 |
SSE Composite Return: | -10.1% |
SSE Composite Daily Volatility: | 0.01 |
π
The A.I. stock picker selects 10 stocks every year
from the Shenzhen/Shanghai Stock Exchange
β The fund equally weights these stocks in the
portfolio
β² The strategy holds these stocks for 1 year with
no further transactions
π Refresh the portfolio in May every year
(Sell all and buy new stock picks)
This A.I. Investor works on international stocks, taking data from EODHistoricalData.com to build on the classic A.I. Investor, with 10x more data and almost 50 stock exchanges to select stocks from. Nothing is hidden here. This is a Robo-Investor where you can see all of the code, a little more complex than the classic A.I. Investor, but using the same principles, and with the book describing every concept used behind the A.I..
The portfolio performance may or may not do well over time, though at least you can see how the A.I. Investor works and can tweak and tinker with it as you like if you coded it yourself.
The book International Build Your Own A.I. Investor Machine Learning and long-term stock investing all in a single code project where you get to program the A.I. Investor yourself.
If that's too daunting, you can always just follow the portfolios that the A.I. outputs, at your own risk.
Requires data subscription from eodhistoricaldata.com.
It might not. The aim here is to pick stocks based on their fundamental figures with Machine Learning, with the underlying approach coming from a Value Investing background-though only from a quantitative perspective.
Some rudimentary backtesting was done, with a margin of safety that should convincingly prove that at the very least it would have worked in the past. Markets themselves change a lot over time, and past performance doesn't truly prove future performance.
The A.I. Investor doesn't optimise for volatility, it instead trys to pick stocks based on the quantitative fundamentals and holds them for a long time (1 year). This kind of investment strategy will turn away most investors, so it's not as if the market is full of competitors using the same strategies.
There are always risks, and relative to the market average we can't all be winners. At least the stocks picked are few, such that anyone should have time to do their own due-diligence by reading the company financial reports and getting to know the business they are buying equity in.
Generally speaking, the A.I. Investor picks stocks that are trading too cheaply relative to metrics such as their book value, return on equity, etc. Over time this should lead to outperformance.
This portfolio will crash too.
Ten stocks are chosen in May every year, taking data from the annual reports for the previous year, so that the financial data can be compared between stocks to select the best. These stocks are then held for a year, with no additional trading to re-weight the portfolio.
Because of this, some stock positions will become a larger part of the portfolio over time, see the pie chart for the current fund positioning.
Stock Exchange | Ticker | Company Name | What They Do |
---|---|---|---|
SZSE | 200152.SZ | Shandong Airlines Co. Ltd | Airlines |
SSE | 600616.SS | Shanghai Jinfeng Wine Company Limited | Winemaking |
SSE | 603003.SS | Shanghai Lonyer Fuels Co. Ltd | Fuel oil supply services |
SZSE | 300175.SZ | Lontrue Co. Ltd | Food |
SZSE | 300836.SZ | Kunshan Top A Intelligent Equipment Co. Ltd | Automotive Components |
SSE | 603730.SS | Shanghai Daimay Automotive Interior Co. Ltd | Automotive |
SSE | 603787.SS | Jiangsu Xinri E-Vehicle Co. Ltd | Electrive Bicycles |
SSE | 603087.SS | Gan & Lee Pharmaceuticals Co. Ltd | Diabetes medication |
SSE | 600981.SS | Jiangsu High Hope International Group Corporation | Textiles and Food |
SZSE | 300184.SZ | Wuhan P&S Information Technology Co. Ltd | Integrated Circuits |
Return Since Inception: | 2.2% |
Portfolio Daily Volatility: | 0.009 |
FTSE100 Return: | 7.9% |
FTSE100 Daily Volatility: | 0.009 |
π
The A.I. stock picker selects 10 stocks every year
from the London Stock Exchange
β The fund equally weights these stocks in the
portfolio
β² The strategy holds these stocks for 1 year with
no further transactions
π Refresh the portfolio in May every year
(Sell all and buy new stock picks)
This A.I. Investor works on international stocks, taking data from EODHistoricalData.com to build on the classic A.I. Investor, with 10x more data and almost 50 stock exchanges to select stocks from. Nothing is hidden here. This is a Robo-Investor where you can see all of the code, a little more complex than the classic A.I. Investor, but using the same principles, and with the book describing every concept used behind the A.I..
The portfolio performance may or may not do well over time, though at least you can see how the A.I. Investor works and can tweak and tinker with it as you like if you coded it yourself.
The book International Build Your Own A.I. Investor Machine Learning and long-term stock investing all in a single code project where you get to program the A.I. Investor yourself.
If that's too daunting, you can always just follow the portfolios that the A.I. outputs, at your own risk.
Requires data subscription from eodhistoricaldata.com.
It might not. The aim here is to pick stocks based on their fundamental figures with Machine Learning, with the underlying approach coming from a Value Investing background-though only from a quantitative perspective.
Some rudimentary backtesting was done, with a margin of safety that should convincingly prove that at the very least it would have worked in the past. Markets themselves change a lot over time, and past performance doesn't truly prove future performance.
The A.I. Investor doesn't optimise for volatility, it instead trys to pick stocks based on the quantitative fundamentals and holds them for a long time (1 year). This kind of investment strategy will turn away most investors, so it's not as if the market is full of competitors using the same strategies.
There are always risks, and relative to the market average we can't all be winners. At least the stocks picked are few, such that anyone should have time to do their own due-diligence by reading the company financial reports and getting to know the business they are buying equity in.
Generally speaking, the A.I. Investor picks stocks that are trading too cheaply relative to metrics such as their book value, return on equity, etc. Over time this should lead to outperformance.
This portfolio will crash too.
Ten stocks are chosen in May every year, taking data from the annual reports for the previous year, so that the financial data can be compared between stocks to select the best. These stocks are then held for a year, with no additional trading to re-weight the portfolio.
Because of this, some stock positions will become a larger part of the portfolio over time, see the pie chart for the current fund positioning.
Stock Exchange | Ticker | Company Name | What They Do |
---|---|---|---|
LSE | BONH | Bonhill Group Plc | Communication Services |
LSE | PLUS | Plus500 Ltd. | Financial Services |
LSE | WBI | Woodbois Limited | Wood and Lumber |
LSE | PPH | PPHE Hotel Group Limited | Real Estate/Hotels |
LSE | CGI | Canadian General Investments Limited | Asset Management |
LSE | BHMU | BH Macro Limited | Asset Management |
LSE | ZAM | Zambeef Products PLC | Beef Producer |
LSE | PAGE | PageGroup plc | Recruitment |
LSE | INDV | Indivior PLC | Pharmaceutical |
LSE | PRTC | PureTech Health plc | Biotech |
Return Since Inception: | -25.5% |
Portfolio Daily Volatility: | 0.012 |
Hang Seng Composite Return: | -25.3% |
Hang Seng Composite Daily Volatility: | 0.013 |
π
The A.I. stock picker selects 10 stocks every year
from the Hong Kong Stock Exchange
β The fund equally weights these stocks in the
portfolio
β² The strategy holds these stocks for 1 year with
no further transactions
π Refresh the portfolio in May every year
(Sell all and buy new stock picks)
This A.I. Investor works on international stocks, taking data from EODHistoricalData.com to build on the classic A.I. Investor, with 10x more data and almost 50 stock exchanges to select stocks from. Nothing is hidden here. This is a Robo-Investor where you can see all of the code, a little more complex than the classic A.I. Investor, but using the same principles, and with the book describing every concept used behind the A.I..
The portfolio performance may or may not do well over time, though at least you can see how the A.I. Investor works and can tweak and tinker with it as you like if you coded it yourself.
The book International Build Your Own A.I. Investor Machine Learning and long-term stock investing all in a single code project where you get to program the A.I. Investor yourself.
If that's too daunting, you can always just follow the portfolios that the A.I. outputs, at your own risk.
Requires data subscription from eodhistoricaldata.com.
It might not. The aim here is to pick stocks based on their fundamental figures with Machine Learning, with the underlying approach coming from a Value Investing background-though only from a quantitative perspective.
Some rudimentary backtesting was done, with a margin of safety that should convincingly prove that at the very least it would have worked in the past. Markets themselves change a lot over time, and past performance doesn't truly prove future performance.
The A.I. Investor doesn't optimise for volatility, it instead trys to pick stocks based on the quantitative fundamentals and holds them for a long time (1 year). This kind of investment strategy will turn away most investors, so it's not as if the market is full of competitors using the same strategies.
There are always risks, and relative to the market average we can't all be winners. At least the stocks picked are few, such that anyone should have time to do their own due-diligence by reading the company financial reports and getting to know the business they are buying equity in.
Generally speaking, the A.I. Investor picks stocks that are trading too cheaply relative to metrics such as their book value, return on equity, etc. Over time this should lead to outperformance.
This portfolio will crash too.
Ten stocks are chosen in May every year, taking data from the annual reports for the previous year, so that the financial data can be compared between stocks to select the best. These stocks are then held for a year, with no additional trading to re-weight the portfolio.
Because of this, some stock positions will become a larger part of the portfolio over time, see the pie chart for the current fund positioning.
Stock Exchange | Ticker | Company Name | What They Do |
---|---|---|---|
HKSE | 2728.HK | Jintai Energy Holdings Limited | Speakers |
HKSE | 1901.HK | Feiyang International Holdings Group Limited | Tourism |
HKSE | 1692.HK | Town Ray Holdings Limited | Household Appliances |
HKSE | 8340.HK | Vinco Financial Group Limited | Financial Services |
HKSE | 8426.HK | Modern Living Investments Holdings Limited | Real Estate Management |
HKSE | 8191.HK | Hong Wei (Asia) Holdings Company Limited | Wood Boards |
HKSE | 8106.HK | Shenghua Lande Scitech Limited | Digital Hardware |
HKSE | 0630.HK | AMCO United Holding Limited | Medical Devices |
HKSE | 0607.HK | Fullshare Holdings Limited | Industrials |
HKSE | 3322.HK | Win Hanverky Holdings Limited | Fashion Apparel |
Return Since Inception: | 25.5% |
Portfolio Daily Volatility: | 0.015 |
BSE SENSEX Return: | 6.3% |
BSE SENSEX Daily Volatility: | 0.012 |
π
The A.I. stock picker selects 10 stocks every year
from the Bombay/National Stock Exchange
β The fund equally weights these stocks in the
portfolio
β² The strategy holds these stocks for 1 year with
no further transactions
π Refresh the portfolio in May every year
(Sell all and buy new stock picks)
This A.I. Investor works on international stocks, taking data from EODHistoricalData.com to build on the classic A.I. Investor, with 10x more data and almost 50 stock exchanges to select stocks from. Nothing is hidden here. This is a Robo-Investor where you can see all of the code, a little more complex than the classic A.I. Investor, but using the same principles, and with the book describing every concept used behind the A.I..
The portfolio performance may or may not do well over time, though at least you can see how the A.I. Investor works and can tweak and tinker with it as you like if you coded it yourself.
The book International Build Your Own A.I. Investor Machine Learning and long-term stock investing all in a single code project where you get to program the A.I. Investor yourself.
If that's too daunting, you can always just follow the portfolios that the A.I. outputs, at your own risk.
Requires data subscription from eodhistoricaldata.com.
It might not. The aim here is to pick stocks based on their fundamental figures with Machine Learning, with the underlying approach coming from a Value Investing background-though only from a quantitative perspective.
Some rudimentary backtesting was done, with a margin of safety that should convincingly prove that at the very least it would have worked in the past. Markets themselves change a lot over time, and past performance doesn't truly prove future performance.
The A.I. Investor doesn't optimise for volatility, it instead trys to pick stocks based on the quantitative fundamentals and holds them for a long time (1 year). This kind of investment strategy will turn away most investors, so it's not as if the market is full of competitors using the same strategies.
There are always risks, and relative to the market average we can't all be winners. At least the stocks picked are few, such that anyone should have time to do their own due-diligence by reading the company financial reports and getting to know the business they are buying equity in.
Generally speaking, the A.I. Investor picks stocks that are trading too cheaply relative to metrics such as their book value, return on equity, etc. Over time this should lead to outperformance.
This portfolio will crash too.
Ten stocks are chosen in May every year, taking data from the annual reports for the previous year, so that the financial data can be compared between stocks to select the best. These stocks are then held for a year, with no additional trading to re-weight the portfolio.
Because of this, some stock positions will become a larger part of the portfolio over time, see the pie chart for the current fund positioning.
Stock Exchange | Ticker | Company Name | What They Do |
---|---|---|---|
NSE | CRISIL.NS | CRISIL Limited | Policy advisory services |
NSE | ABB.NS | ABB India Limited | Engineering and construction |
NSE | SCHAEFFLER.NS | Schaeffler India Limited | Bearing manufacture |
NSE | RSYSTEMS.NS | R Systems International Limited | IT service management |
NSE | RAIN.NS | Rain Industries Limited | Carbon specialty chemicals |
NSE | DICIND.NS | DIC India Limited | Printing, publishing and packaging |
NSE | HDFC.NS | Housing Development Finance Corp Ltd | Financial services |
NSE | NESTLEIND.NS | NestlΓ© India Limited | Food and beverages |
NSE | SANOFI.NS | Sanofi India Limited | Biopharmaceutical |
BSE | STOVACQ.BO | Stovec Industries Ltd | Textiles, graphics; electroforming |