Overview

1 The analytical investor

This chapter opens by reframing investing as a practical path to greater autonomy for programmers facing volatile workplaces and uncertain career arcs. It argues for building passive income over time, grounded in rational thinking and patience rather than shortcuts. The reader is guided to quantify monthly surplus, clarify goals, risk tolerance, and time commitment, and to treat risk and return as inseparable pillars. The promise is not overnight wealth but a disciplined, analytical approach that compounds small, repeatable advantages into meaningful financial independence.

After establishing mindset and process, the chapter surveys the investing universe and how to analyze it. It explains core asset classes—stocks, bonds, ETFs and mutual funds, hedge funds, forex, crypto, derivatives (especially options), private equity, commodities, and real estate—highlighting trade-offs such as liquidity, credit risk, income versus appreciation, scalability, and volatility. It urges selecting assets only after answering four personal questions about needs, available capital, risk appetite, and time. To avoid speculation, it contrasts gambling with long-term investing and shorter-term trading, then lays out the research toolkit: quantitative analysis of standardized financials, data collection and aggregation, technical analysis, and machine learning; plus qualitative work on brand, management, competitive dynamics, and sentiment—augmented by generative AI and AI agents. It closes this toolkit with portfolio construction and execution: value, growth, and income styles (and blended approaches), core–satellite design, long and short positioning, day and swing trading, algorithmic execution, unified portfolio monitoring, and rigorous backtesting.

The final theme is risk: markets are unpredictable, past returns don’t guarantee future results, and sentiment can overwhelm fundamentals. The chapter introduces hedging as “insurance” that deliberately trades some upside for protection, and encourages contrarian discipline when crowds become euphoric or fearful. It also shows why programmers possess an “unfair” edge—systems thinking, comfort with data and automation, patience, abstraction, and domain insight into emerging technologies—provided they define clear parameters for risk, time, and ethics. Rather than prescribing specific picks, the book aims to help readers convert engineering habits into a repeatable, data-driven investment process that balances growth, income, and risk management.

A survey of the tools and techniques covered in this book, including pointers to the chapters that focus on the relevant domains. We use financial platforms and publicly available information to collect data on securities. We can generate more insights about the securities using various analytical methods including machine learning and artificial intelligence. We apply these new insights to our decision-making processes.
Shows the price development of NVIDIA from 2016 to 2025. Notice the sharp rise in recent years; this is a typical example of the growth that attracts many traders and investors. Keep in mind that such growth rates are rare, and every investor d
Candlesticks help us evaluate stock performance over multiple days. Black (or red) shows that a stock's price decreased, while white (or green) shows that it increased during the day.
Comparison of returns of stocks, bonds, and cryptocurrency(generated by ChatGPT)

Summary

  • An investment is an asset or item acquired to generate income or appreciation.
  • Assets are not restricted to financial products. Each asset follows different rules and principles to generate value. Non-financial assets can be complex for new investors to trade as they are non-fungible (not interchangeable).
  • Unlike most other assets, financial assets are fungible, a feature that makes them significantly easier to trade.
  • A share is a partial ownership of a publicly listed company. Therefore, every investor could purchase a majority in publicly traded companies. Stocks are usually purchased through stockbrokers.
  • Private equity is ownership in privately held companies that are not available on a public stock exchange.
  • Derivatives are investments that are created from an underlying asset. A stock option offers an investor the right to buy or sell a stock under predefined conditions. You can also trade options, which means you can acquire or sell the right to trade.
  • Selling stock options can provide you with a small income, but you might face significant risks in some scenarios.
  • Dividends are payments made by a company to its shareholders in proportion to the number of shares they hold. Not every company pays dividends. Coupon payments, in contrast, are payments received for bonds.
  • Unlike stocks, bonds are associated with debt. Bondholders do not own parts of the organization to which they lend money; instead, they receive interest payments as compensation for their investment.
  • ETFs are pooled investments that are mostly passively managed and contain multiple assets. Holding ETFs is generally considered less risky for investors than holding stocks.
  • A hedge fund is a riskier investment vehicle that employs more advanced investment strategies, typically sold to a limited number of accredited investors and institutions.
  • Cryptocurrency is an asset that enables people to transfer value without requiring third-party involvement in transactions.
  • Although some assets are called risk-free, no asset is entirely without risk.
  • Programmers may possess a range of skills that enable them to make data-driven investment decisions.
  • New investors benefit from defining investment goals before exploring investment strategies, as each strategy requires a different level of investment, risk tolerance, and time commitment.
  • This book does not give financial advice. It aims to teach best practices for utilizing programming skills and artificial intelligence to gain deeper insights and make more informed investment decisions.

FAQ

What does it mean to be an “analytical investor” in this chapter?It means building wealth with disciplined, data-driven decisions rather than gut feelings. You weigh risk and return, learn what you’re investing in, and rely on research, rational thinking, and patience—avoiding gambling-like speculation.
How should I start my investment journey as a programmer?Begin with a personal “discovery” phase:
  • Estimate your average monthly surplus after optimizing expenses.
  • Define goals and timelines (e.g., financial independence, a home, flexibility).
  • Assess risk tolerance (how much loss you can stomach) and expected returns.
  • Decide how much time you can consistently dedicate to research and monitoring.
These inputs shape the assets and strategies you choose.
What’s the difference between capital appreciation and passive income?They’re the two primary ways to monetize assets:
  • Capital appreciation: Buy low, sell high (e.g., a stock rising in price).
  • Passive income: Regular cash flows (e.g., bond coupons, stock dividends, rent).
What should I know about stocks and dividends before investing?Stocks represent ownership in a company, and prices move with supply/demand, company performance, and macro factors. Some pay dividends, but yields can be low relative to alternatives. For example, the chapter notes a ~0.5% dividend yield example versus a ~4.3% 10-year U.S. Treasury—so buying solely for that dividend may lag inflation unless you also expect capital gains.
How do bonds work, and what risks matter?A bond is an IOU: you lend principal to an issuer and receive coupon payments until maturity, when principal is repaid. Key considerations:
  • Credit risk: Issuer default likelihood (ratings help evaluate).
  • Yield vs. risk: Higher yield usually means higher risk.
  • Price risk: Selling before maturity can realize gains or losses.
U.S. government bonds are treated as “risk-free” in models, though “extremely low risk” is more precise.
What are ETFs, mutual funds, and hedge funds—and how do they differ?
  • ETFs: Trade intraday on exchanges; often passively track indexes; low expense ratios; easy diversification.
  • Mutual funds: Diversified and regulated; priced once daily at NAV; do not trade intraday.
  • Hedge funds: Less regulated, higher minimums, complex strategies; generally for accredited investors.
What should I know about derivatives and options as a beginner?Derivatives derive value from an underlying asset. Options grant the right, not the obligation, to buy (call) or sell (put) at a strike price before expiration. Buying options caps loss at the premium; selling options earns premium but creates obligations and can carry large downside. Options are powerful but complex—best approached carefully within a risk-focused framework.
How do quantitative and qualitative research (and AI) fit into this approach?
  • Quantitative: Standardized financials (revenue, margins, P/E), cross-company comparisons, historical analysis, technical indicators, and machine learning for forecasting.
  • Qualitative: Management quality, brand strength, competitive dynamics; can be structured via NLP, sentiment analysis, and scraping.
  • AI and agents: Summarize filings/news, analyze sentiment, automate research workflows, and generate reports.
What portfolio styles are introduced, and can I combine them?The chapter outlines value (buy undervalued), growth (back fast expanders you understand), and income (focus on steady cash payouts). You can blend them—e.g., GARP (growth at a reasonable price)—and use a core-satellite setup:
  • Core: Long-term, diversified holdings to compound.
  • Satellites: Tactical slices for trading, income, or focused themes.
How should I think about risk, hedging, and market unpredictability?Past performance doesn’t guarantee future returns. Social media, macro shocks, and sentiment can move prices abruptly. Use hedging (like insurance) to offset potential losses—often sacrificing some upside for downside protection. Recognize that startups and crypto can offer high upside with high drawdown risk. Maintain discipline: be cautious when markets are euphoric, and stay rational when they’re fearful.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Investing for Programmers ebook for free
choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Investing for Programmers ebook for free