Saturday, November 30, 2024

Trying out AI - Rebalancing my Investments

I keep looking for ways to leverage AI both at work and in my personal life. Recently, I asked for help rebalancing my portfolio. The following is a series of prompts that I used to get there.

The first step was to document my holdings. I have accounts across several management companies and about 100 different assets. I tried to export them from each company, but none had an export feature. This is where I started using ChatGPT to parse my statements and export them as a table. 

Using the attached investment account statement, extract the current holdings from the document and give them back to me as a CSV file. 


I worked with ChatGPT to correct this, as it would only read a page of the data. We went back and forth several times before I got the results I needed, including looking up the expense ratio for every mutual fund and EFT. Next, I described how I wanted my portfolio to be rebalanced.
   

Balance my portfolio rooted in Nobel Prize-winning economic theories would emphasize diversification, broad market exposure, and risk management. Allocating across asset classes using the following:

Portfolio Allocation

  1. Equities (60%-70%)
    • Domestic Equity (35%-40%): Broad exposure to U.S. stocks via total market or S&P 500 index funds. Include a small-cap tilt (e.g., small-cap value funds) to capture the small-cap premium identified by Fama and French.
    • International Equity (20%-25%): Diversify across developed markets and emerging markets. Consider including small-cap international funds to enhance diversification and returns.
    • Value Tilt (10%-15%): Increase allocation to funds focusing on value stocks (high book-to-market ratios) to capture the value premium
  2. Fixed Income (30%-40%)
    • Domestic Bonds (20%-25%): Investment-grade government and corporate bonds for stability. A portion in inflation-protected securities (e.g., TIPS) to guard against inflation risks.
    • International Bonds (10%-15%): Include exposure to developed market and emerging market bonds to diversify currency and interest rate risks.
  3. Alternative Assets (Optional: 5%-10%)
    • Real estate investment trusts (REITs) for exposure to real estate.
    • Commodities or other diversifying assets if aligned with the investor’s goals.
  4. Cash and Cash Equivalents (5%-10%)
    • For liquidity and short-term needs, including high-yield savings, money market funds, or short-duration Treasury bonds.

Design Principles

  1. Market Efficiency: Avoid active stock picking or market timing, as the Efficient Market Hypothesis suggests these strategies rarely outperform
  2. Diversification: Use a fund-of-funds approach to spread investments across many asset classes, sectors, and geographic regions, reducing unsystematic risk.
  3. Small-Cap and Value Tilt: Emphasize small-cap and value stocks to capitalize on their historical outperformance as identified in the Fama-French Three-Factor Model.
  4. Risk Management: Use a mix of equity and fixed-income securities to align with the investor’s risk tolerance and investment horizon, reflecting principles of Modern Portfolio Theory.
  5. Low Costs: Prefer passive index funds or ETFs to minimize expenses and maximize net returns. The attached file lists my holdings across accounts, with the last column being the account name those holdings are in. Balance all my holdings listing unique transactions.
Below is a table with a list of my holdings across accounts. The first row is the column names. The last column being the account name those holdings are in.

It took a bit of coaxing to get a final portfolio. First, I have my holdings across five separate accounts, and getting ChatGPT to balance across accounts took a bit prompting. Some accounts had cash that would not get invested, so I had to remind it that the goal was to have between 5-10%. Another prompt resulted in more mutual funds with high cost ratios, which I wanted to minimize. So I added a prompt specifying that any mutual fund or ETF should have a cost ratio of .05%.

Once I had a portfolio rebalancing working the way I wanted, I asked for a list of transactions needed to achive that portfolio. This resulted in some wierd side effects where there were too many trades resulting in lots of transaction fees, so I added an instruction to minimize the number of trades. If I already owned Apple in one account, don't sell it if also going to buy it in another account.



I ended up with a list of trades to perform across each account. I don't know about you, but I have taken notice of that warning at the bottom of the screen recommending that any output should be double checked. So that set of prompts began.

I asked for the detailsof why each security was chosen, what rule(s) / criteria were used and what the amount specific was chosen. The output was very informative and is what I used to check the BUY transactions specified. I didn't find anything wrong. I further probed by asking which other securities were considered for each buy and why the one recommened was selected over the others. The following is one of the securities from that details.

Fund Selected: Fidelity Total Market Index Fund (FSKAX)


• Expense Ratio: 0.015%


Selection Logic:


• Broad Market Exposure: FSKAX tracks the Dow Jones U.S. Total Stock Market Index, providing comprehensive exposure to the entire U.S. equity market, including large-cap, mid-cap, and small-cap stocks.

• Low Expense Ratio: At 0.015%, it is one of the lowest-cost options available, aligning with your preference for minimizing expenses.

• Fund Size and Liquidity: With significant AUM, it offers high liquidity and stability.

• Alignment with Strategy: Provides a foundation for the Domestic Equity portion of your portfolio, supporting diversification and market efficiency principles.


Other Assets Considered:


• Vanguard Total Stock Market Index Fund (VTSAX): Expense Ratio of 0.04%. Not selected due to a higher expense ratio compared to FSKAX.

• Schwab Total Stock Market Index Fund (SWTSX): Expense Ratio of 0.03%. FSKAX was preferred due to the existing relationship with Fidelity and slightly lower expense ratio.


I found this all very helpful and it helped me to trust (or not) the trades recommended. 

What have I done with all this information? Nothing, yet. It's not clear to me if this was anything more than an intellectual excersize. It was very cool and I learned a couple of things - patience being a big one. It took me four days to complete all of this.

Monday, November 11, 2024

It's all Ball Bearings (AI) These Days


I saw recently that Google and Amazon announced how much AI they use to generate code, Google in percent, and Amazon in hours saved. There has been a lot of hype that it is all AI these days. Over the summer, I played around with different AIs to get my head in this space to see how much is hype.

I built a few Python apps in Google Colab to detect license plates in a video stream from my bike rides. Colab uses Codey and Gemini, and they did an excellent job of getting me started as someone who didn't know Python or the libraries available. I am a trial-and-error learner who tries something and, when it doesn't work, refers back to references to figure out why. At one point, I had a working app and asked how I could change the implementation to be multi-threaded, which it did. It didn't work, but that resulted from Colab and not the code generated.

In my new job, I make a point to use ChatGPT, GitHub Copilot, and/or Claude a few times a week. Last week, I asked it to create two apps for me; a random people picker as a spinning wheel and an out-of-office (OOO) helper. The spinner took me about 15 minutes to get right, so I repeatedly asked Copilot to modify the implementation to get it the way I wanted. In the end, it was close, and I made minor changes to the CSS. The exciting thing about this approach was that I iterated with Copilot to turn the implementation instead of finding completed implementation(s) and Frankensteining them together.

Where it has yet to work well for me at work is melding technology with the specifics of my organization. For instance, what does an executive dashboard look like for our ecosystem? Or what is the best way to configure the on-call paging system across our teams? Sure, I asked if there were any best practices or pitfalls others have run into, and the answers were very generic, which is what I would expect.

My experience and intuition suggest that we can benefit from leveraging AI. As I build the 2025 roadmap, I am encouraging the team to consider how AI or AI-powered products can help us achieve more and faster.

Tuesday, November 5, 2024

Exploring DORA


We are considering implementing DORA metrics to help track and improve our outcomes. I had never heard of the term DORA, but most of the metrics rolled into this moniker I have a history with. As part of the discussion around DORA, we met with a few vendors whose products integrate with GitHub, Jira, etc., to surface metrics. While we didn't end up purchasing a product to help here, it wasn't because we needed to see the value of DORA. On the contrary, we value the outcomes that DORA metrics (et al.) are after; it is more about timing. Through acquisitions, mergers, and growth, we have a diverse group of teams, each at different maturity levels and mechanisms around SDLC. Starting to track DORA-esque metrics when a team may be working to climb up on the maturity curve seems premature for a few reasons. First, we should focus on helping teams up-level their SDLC. For instance, CI/CD is good, so everyone should do that. Second, most mechanisms have some metrics as outputs that we can leverage. If you're doing Scrum, are you tracking the key metrics or meeting every two weeks to plan work? Lastly, we need to be careful when comparing across teams that don't do the same thing or have similar needs. The apples and oranges analogy exists because it works.

As a team leader looking to uplevel the entire engineering organization, DORA and products that capture related metrics sound attractive from a centralized visibility perspective. Being new to the organization, I know relatively little about each team's maturity level, but many feel there is room to improve. Does that mean we are not going to track any DORA metrics? Of course not; we will track the ones with shared mechanisms and leverage that data. Measure, identify, improve, repeat.

P.S. I was pre-Dora The Explorer. But my kids weren't. Geography interests me, so this Dora is fabulous in my book.


A Brief History of Time - AI Style