Copyright © 2025 Tyler Liu
All rights reserved.
First Edition, April 2025
Disclaimer
Foreword
Preface
Acknowledgments
Contents
I Fundamentals of Stock Trading
1 Introduction to Stock Trading
1.1 What are stocks?
1.2 Understanding Stock Markets
1.3 Why trade stocks?
1.4 Types of trading: Long-term investing vs. trading
1.5 Understanding risk
1.6 Stock Trading vs. Other Types of Investments
2 Getting Started with Stock Trading
2.1 Setting up a brokerage account
2.2 How to place a trade
2.3 Key terminologies
2.4 Risk management basics
3 Introduction to ETFs and SPY
3.1 What are ETFs?
3.2 SPY: Overview and Historical Significance
3.3 SPY: Performance Over Time
3.4 Benefits of Trading SPY
3.5 SPY vs. Other ETFs
4 Understanding Trends and Indicators
4.1 What are Market Trends?
4.2 Identifying Bullish and Bearish Trends
4.3 Importance of Indicators in Trading
4.4 Common Indicators: Volume, RSI, MACD, etc.
4.5 Limitations of Indicators
5 Introduction to Moving Averages
5.1 What is a moving average?
5.2 Simple Moving Average (SMA) explained
5.3 Exponential Moving Average (EMA) explained
5.4 Comparing SMA and EMA: Pros and Cons
5.5 Other types of moving averages
6 Trading with Moving Averages
6.1 How moving averages identify trends
6.2 Golden Cross and Death Cross
6.3 Using Multiple Moving Averages
6.4 Practical examples of moving average strategies
7 Fundamentals of Options Trading
7.1 Why trade options? A preview of power and risk
7.2 Understanding call and put options
7.3 Intrinsic value and time value explained
7.4 Getting started with options trading
7.5 Broker permissions: enabling options on Robinhood
8 Leverage and Call Options
8.1 What is leverage and how it magnifies returns
8.2 Risks associated with leverage
8.3 How Strike Price Determines Leverage Level
8.4 Understanding time value and expiration decay
8.5 Using Long-Term Deep ITM Call Options
II Building Data-Driven Trading Strategies
9 Introduction to Backtesting
9.1 What is Backtesting?
9.2 A First Example: Testing a SMA Strategy
9.3 A Philosophy of Realism and Conservative Assumptions
9.4 Roadmap for This Part
10 Working with Market Data
10.1 Downloading SPY Data from Yahoo Finance
10.2 Automated Data Fetching via API
10.3 Overview of the SPY Dataset
10.4 Close Price vs. Adjusted Close Price
10.5 Data Cleaning and Daily Alignment
11 Building a Realistic Simulation Framework
12 Programming the Basics
13 Strategy 1 — Buy and Hold
14 Strategy 2 — Price Crosses a Moving Average
15 Strategy 3 — Golden Cross and Death Cross
16 Stress Testing Strategy Parameters
17 Introducing Leverage with Call Options
18 Leveraging a Strategy
19 Final Thoughts and What Comes Next
Glossary
Additional Resources