Country: South Korea
You are in the South Korea edition. Type your country to switch.
Nigeria
Loading every country…
No country matches. Check the spelling, or choose "Any country" for the Global edition.
You are learning in the South Korea edition, with examples in won and from South Korea.
Your learning profile
Advanced path · Free course
Financial Data Lab
Hands-on: Python and SQL described step by step on sample files, from loading and cleaning prices to returns, risk and a small report. Checked answers to set questions; no live trading code and no broker connections.
- Advanced level
- 8 lessons
- 2 hours of study
- 1 final test
- $10 certificate
- Korea edition
Education, not advice: this course explains how products and rules work. It does not recommend any product, trade or provider.
What you will learn
- By the end you can load a CSV file of prices into Python with pandas and into a SQLite database.
- By the end you can compute daily simple returns and log returns for each share in a price table with pandas.
- By the end you can draw a labelled price chart from a pandas table with matplotlib and save it as an image file.
- By the end you can create a price table in SQLite with a primary key on ticker and date, and load sample rows into it.
- By the end you can build adjustment factors for a share split, a bonus issue and a cash dividend.
- By the end you can build a word-list sentiment classifier for headlines in a few lines of Python.
- By the end you can split data into training and test parts, fit models of rising complexity and compare their errors.
- By the end you can turn the lab work into a notebook that anyone can rerun from scratch and get the same numbers.
Skills you will practise
Syllabus
-
Lab 1: reading CSV files in Python and SQLA CSV file is the plain-text table most financial data arrives in. This lab shows how to load one into Python with pandas and into a SQLite database,…
10 min · 5 steps
- Before you start: tools, data and the rules of the lab
- The sample file
- Loading the file in Python
- Loading the same file into SQLite
- The usual traps and how to catch them
- Lesson quiz
-
Lab 2: computing returns in codeThis lab turns a column of prices into daily returns, cumulative returns, annualised volatility and maximum drawdown in Python, and shows how to chec…
10 min · 5 steps
- Returns multiply, they do not add
- The sample file and the return code
- Cumulative return and volatility
- Maximum drawdown in code
- Testing the code before you trust it
- Lesson quiz
-
Lab 3: plotting prices and returnsThis lab draws the four charts most analysis needs, using matplotlib: a price line, two shares rebased to 100, a histogram of returns and a drawdown …
10 min · 5 steps
- A first price chart, properly labelled
- Comparing two shares: rebase to 100
- Normal or log scale?
- A histogram of returns and a drawdown chart
- An honest-chart checklist in code
- Lesson quiz
-
Lab 4: SQL on a price tableThis lab builds a small price table in SQLite and answers real questions with SQL: filtering by date and ticker, averages with GROUP BY, joining a co…
10 min · 5 steps
- Build a small price database
- Selecting, sorting and summarising
- Joining prices to companies
- Returns and moving averages with window functions
- SQL and Python together
- Lesson quiz
-
Lab 5: cleaning corporate actions in codeThis lab adjusts a raw price series for a share split and a dividend in Python, using an adjustment factor applied to every earlier price, then check…
10 min · 5 steps
- A crash that never happened
- Building the adjustment factors
- Applying the factors in pandas
- Checking the adjusted series
- Ticker changes and permanent identifiers
- Lesson quiz
-
Lab 6: a sentiment classifier on sample headlinesThis lab builds the simplest possible sentiment classifier, a word list that scores invented headlines as positive or negative, and measures it hones…
10 min · 5 steps
- The simplest classifier there is
- The labelled headlines and the code
- Measuring it honestly
- Where word counting fails
- The tuning trap
- Lesson quiz
-
Lab 7: watching a model overfitThis lab fits models of rising complexity to invented data and watches the error on the training data fall while the error on held-back test data fir…
10 min · 5 steps
- The experiment
- Fitting models of rising complexity
- Reading the pattern
- Trying many rules: winning by luck
- Splitting financial data properly
- Lesson quiz
-
Lab 8: writing the model card and a reproducible notebookThe lab ends with two documents that make work trustworthy: a notebook someone else can rerun from scratch and get the same numbers, and a model card…
10 min · 5 steps
- If nobody can rerun it, nobody can check it
- Four fixes that do most of the work
- Recording the data: source, licence and checksum
- Writing the model card
- The final check before you share
- Lesson quiz
Final test
A fresh set of questions drawn from every lesson of this course, timed, with the options in a new order every time. You need 85% to pass, and passing earns your certificate.