LearnFinance
💻
Intermediate

Spreadsheets & Python for Finance

The tools behind every finance job, practised rather than described: spreadsheet functions for time value and cash flows, lookups and pivots on real data, building a clean model with checks and scenarios, then Python notebooks with pandas for loading market data, computing returns and volatility, and running a first honest backtest.

0%
Module progress
0 / 6 lessons

Lessons

6 total

Read each lesson, try its calculators and quick checks, then pass its quiz (60% or more) to complete it and unlock the next. Score 80% on the capstone to master the module. Progress is saved in this browser.

  1. 01
    Spreadsheet finance functions: PV, FV, PMT, RATE, NPV and XIRR
    The handful of spreadsheet functions that do most of finance's time-value maths: PV, FV, PMT, NPER and RATE for loans and savings, NPV and IRR for regular cash flows, and XNPV and XIRR for real cash flows on actual dates. The sign rule that trips everyone up; a home loan, NPV's one-period trap and a SIP's XIRR, worked step by step; and how RATE uncovers the true cost of a loan with fees, the annual percentage rate the RBI's Key Fact Statement rules now make lenders show.
    16 min · +50 XP
  2. 02
    Tables, lookups and pivots: shaping real financial data
    Most finance work starts with messy lists: transactions, holdings, invoices, prices. How to store data as proper tables; valuing a portfolio with XLOOKUP, step by step; approximate-match lookups for tax slabs, with a 2026-27 new-regime calculator and marginal relief worked through; SUMIFS and pivot tables on a bank statement; the 2020 case where a spreadsheet's row limit lost 16,000 COVID test results; and the lookup errors that quietly corrupt models.
    16 min · +50 XP
  3. 03
    A clean model: inputs, checks and scenarios
    A model is only useful if others can follow it, trust it and change it safely. How to separate inputs, calculations and outputs; colour-code and label consistently; build checks that flag errors automatically; switch between bear, base and bull cases with one cell, worked step by step with a calculator; read a two-way sensitivity table; and the copy-paste spreadsheet errors behind JPMorgan's 2012 'London Whale' loss.
    16 min · +50 XP
  4. 04
    Python for finance: notebooks, pandas and dates
    Why analysts add Python to their spreadsheets, how to set up a notebook, and the pandas DataFrame as a programmable spreadsheet, with a SUMIFS and a lookup rebuilt in code step by step. The date handling financial data depends on: day-first Indian dates, indexing by date, resampling daily data to months, and the special sessions, like Diwali's muhurat trading and the Saturday Budget session of February 2025, that break 'markets shut at weekends'; plus exact holding periods for returns, with a calculator.
    16 min · +50 XP
  5. 05
    Getting and cleaning market data
    Bad data gives confident wrong answers. Where to get Indian market data, from exchange downloads to free libraries; why prices must be adjusted for splits, bonuses and dividends, worked step by step with a calculator and shown by Reliance's 1:1 bonus in October 2024; a cleaning checklist with pandas checks; and the survivorship and look-ahead biases, seen in Satyam's and Yes Bank's exits from the Nifty, that make backtests look better than reality.
    16 min · +50 XP
  6. 06
    A first analysis in Python: returns, volatility and a simple backtest
    Putting the module together: daily returns from adjusted prices; annualising average return and volatility, step by step with a calculator; a maximum drawdown worked by hand; a Sharpe ratio; then an honest backtest of a 200-day moving-average rule, with a one-day lag against look-ahead, trading costs, and the tax drag that India's July 2024 rise in short-term gains tax makes worse for active strategies.
    16 min · +50 XP
  7. 🏁
    Capstone Quiz
    Test everything from this module in one go.
    15 questions