Basic

The math behind a market bet

Quantitative finance is just a fancy way of saying: turn vague feelings about the market into numbers you can actually test. A 'quant' does this for a living, and the whole appeal is that the numbers don't care how you feel about a stock. This page teaches the ideas, not risky financial advice.

About 2 min of reading

Data Flow

Raw market data is turned into numbers, and those numbers are tested before anyone acts.
1 Collect price data
↓
2 Put it in a table
↓
3 Calculate simple numbers
↓
4 Check the pattern
Why this works
Data first

Every quant project starts with data: prices, volumes, earnings. Without clean data, no model is trustworthy, and finding or loading that data is usually the bulk of the work before any interesting thinking happens.

Math, not guessing

A quant doesn't guess. Every claim needs a number and a test run against real history. If a strategy can't be shown to work on past data, it sits on the shelf. Beliefs don't count for anything here.

Examples

Numbers that come straight from prices

Apple closed at $150 yesterday and $153 today.
The price went up $3, or about 2%.

That's the entire job, distilled. A quant takes a raw price and turns it into a percentage, a comparison, a trend. One day it's a note. Over years of history it becomes something you can actually test.

Turning a headline into a number

Oil rose 5% on a supply cut.
A quant flags this as a possible signal for energy stocks.

Most people read a headline and react. A quant reads it and asks a quieter question: what would I have done, and could I have tested that guess against the last ten years? Reading the world and turning events into testable numbers is what sets them apart from the crowd.

Rules instead of feelings

# A strategy is just a written set of rules
if price_below_average():
    buy()
if price_above_target():
    sell()

The moment you write an idea down as code, you stop arguing about it and start testing it. You can no longer say "I knew it would work" when you never actually tried. That's a relief, not a restriction.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

Next Lesson
Working with tables in pandas
Working with tables in pandas →