Appendix A — Setting up your tools
The toolchain for this course is a text editor without telemetry, a language model that runs on your own laptop, and a version control system. Every one of them is open source, and none of them requires an account, a subscription or a network connection to work. That is not frugality. Each choice teaches something the alternative would obscure, and the reasons are worth stating before you spend ninety minutes installing them.
A.1 VS Codium, rather than VS Code
Visual Studio Code is developed in the open, under a permissive licence. The build Microsoft distributes is not the same artefact: the binary adds telemetry and ships under a proprietary licence, and its extension marketplace is a Microsoft service with terms of its own. VS Codium is the identical source, compiled without the telemetry and the branding.
The practical reason for preferring it is that in this course you will open data you do not own. The teaching data are public, but the habit is not about these data — it is about the working file you will one day open under a non-disclosure agreement or a research ethics protocol. An editor that reports usage to a third party is a decision you should make deliberately, once, rather than by default.
The larger reason is that it makes visible something students consistently underestimate: how much of the commercial software estate is open source underneath. This is not a marginal phenomenon. The servers that host almost every service you use run Linux. Every Android phone runs a Linux kernel. Every browser you are likely to open is built on Chromium or WebKit, both open source. SQLite — public domain, maintained by three people — is embedded in essentially every phone, browser and operating system in the world. The scientific stack this course runs on, Python and NumPy and pandas and scikit-learn and statsmodels, is open source without exception, and the commercial data science platforms sold at considerable expense are, in large part, packaging around exactly those libraries.
The point for a business student is not ideological. It is that the capability you are buying when you buy a platform is frequently available directly, that the difference in price is buying convenience and support rather than capability, and that knowing which is which is a procurement skill.
A.2 Qwen 2.5 Coder, running locally
The model you install is Chinese, developed by Alibaba. It is worth being direct about that, because the reflex is to treat provenance as the security question, and here it is not.
What matters is that the weights are open and the model runs on your machine. An open-weight model downloaded to your laptop and run offline cannot send your data anywhere; it has no network connection to send it over. A closed model behind an API, wherever the company is domiciled, receives everything you type by construction. On the dimension people actually care about — does my work leave this room — local open weights are the stronger guarantee, and the nationality of the developer does not enter into it. You can verify this claim rather than trust it: disconnect from the network and watch the model keep working.
This is also your first encounter with a distinction the course returns to. Qwen 2.5 Coder is a vertical model: specialised for code, and consequently far better at code, for its size, than a general assistant many times larger. A three-billion-parameter model on a laptop is not competitive with a frontier system at open-ended reasoning. At completing a pandas idiom it is entirely adequate. Choosing a small specialised model over a large general one — and knowing which tasks admit that trade — is the applied judgement that separates a sensible AI deployment from an expensive one, and it is the same judgement that chapter 5 will make about a deliberately biased estimator.
The course installs the 3-billion variant rather than the 7, and the reason is worth stating because it is the same reasoning in miniature. Most student laptops have no dedicated graphics card, so the model runs on the processor. On a processor the 7B is not a better model: it produces a comparable answer to the same question at roughly a quarter of the speed, and a tool slow enough to interrupt your thinking is a tool you stop using. The binding constraint is not quality, it is whether you will actually reach for it.
The standing rule of the course applies to it from the first day: every deliverable must document at least one instance where you identified a model output as wrong, unverifiable or misleading, and explain how you established that. You are never penalised for using the model. You are penalised for using it uncritically.
A.3 Two ways of using it, deliberately
The same model is reached through two different tools, and the split is not redundancy.
Continue puts the model in the editor. You select code and ask about it, and the answer arrives beside the file. This is the mode that matters most in a course where you will read far more code than you write — the session decks, the authors’ replication packages, your group’s scripts. The friction of copying code into a browser is small, and it is enough to stop most people asking.
aider puts the model in the terminal, inside your repository, where it can change files and commit what it changed. That is a different kind of act, and the course treats it as one. You see every command it proposes before it runs, and whatever it writes is committed under your name — which is the point, since the commit history is one of the records used to check that all three members of a group did the work. Delegating the typing does not delegate the answerability.
The honest limitation, stated once: on a machine without a graphics card, a small model is a capable reader and an unreliable editor. It will explain a function correctly and then fail to produce a well-formed multi-file edit, because emitting a precise diff is a harder task than describing code. That is a fact about small models rather than about you, and the practical response is to use aider for understanding and do the editing yourself — which is, in any case, the position the course would prefer you were in.
A.4 git
git is the least glamorous item on the list and the one most likely to matter to your career.
Its immediate function is to make your work reproducible. This book takes the position that a result which does not reproduce from a clean clone is not a result — and that standard is empty without a mechanism. git is the mechanism. It records what the analysis was at the moment the number was produced, so that “we got 1,111” becomes a claim someone can check rather than one they must accept.
Its second function is provenance under disagreement. In group work, the log answers questions that memory cannot: who changed the specification, when, and what the estimate was before. That is why the individual multiplier on group work is gated on the git history rather than on assertion. It is not surveillance; it is the same reason laboratory notebooks are dated.
Its third function is that it is how the rest of the field works. The replication packages you will download are distributed as repositories. The libraries you rely on develop in public, and their issue trackers are often the only accurate documentation of a bug you have just hit. Being able to read a diff, open an issue and submit a fix is a professional literacy, and the distance between using open source and contributing to it is one commit.
You will not become fluent in git this term. You need four commands — clone, add, commit, push — and the understanding that a commit is a checkpoint you can return to. The rest can wait.
A.5 What they have in common
Open source, no account required, and everything running on hardware you control. It means the whole course works with no internet in the room, that nothing you do is contingent on a vendor’s pricing decision, and that every result in this book can be reproduced by anyone, on a modest machine, without paying for the privilege.
That last property is not a convenience. It is what makes the work checkable, and checkability is the only thing that separates quantitative analysis from assertion with numbers in it.
A.6 Doing it
Budget 60–90 minutes for the first half, before Session 1, and 45 minutes for git, before Session 2. Installation time is not class time.
A.7 Setup checklist — VS Codium, Python, and a local LLM
complete before Session 01 · budget 60–90 minutes
The walkthrough is the slide deck,
MATH60033A-S01-Pre-Session.pptxin this folder. Work through that. This page is the checklist you scan afterwards, plus the troubleshooting table. If the two ever disagree, the deck is right.
A.7.1 Why this stack
| Choice | Reason |
|---|---|
| VS Codium rather than VS Code | Same editor, telemetry removed. Your work involves confidential and licensed data; the tooling should not exfiltrate it. |
| A local LLM rather than a hosted one | Your data never leave your machine. You also learn what is achievable without a frontier system — the realistic institutional constraint. |
| Plain Python + git rather than a notebook platform | Reproducibility is graded. A commit history is auditable; a notebook’s execution state is not. |
Tooling is a governance decision, and you should be able to defend yours. That is the first substantive lesson of the course.
A.7.2 What your machine needs
No graphics card is required. Everything runs on the processor, more slowly.
| Enough | Comfortable | |
|---|---|---|
| RAM | 8 GB | 16 GB |
| Free disk | 12 GB | 20 GB |
| CPU | anything from the last five years | Apple Silicon, or Intel i7 10th gen and later |
| Graphics | none | 8 GB VRAM, which makes the model 5–10× faster |
Speed, in tokens per second — roughly a short word each:
| tokens/s | a short answer | |
|---|---|---|
| Dedicated GPU, or Apple Silicon | 15–40 | a second or two |
CPU only, qwen2.5-coder:3b |
8–20 | a few seconds |
CPU only, qwen2.5-coder:7b |
3–8 | half a minute or more |
Use the 3b unless ollama ps reports 100% GPU. On a processor the 7b is not a better model — it is the same answer, four times slower.
A.7.2.1 Per tool
| RAM | Disk | Notes | |
|---|---|---|---|
| Ollama | 8 GB for a 3b, 16 GB for a 7b | ~2 GB per model | A model needs its file size plus about a fifth, in memory |
| Continue | the model’s, plus nothing much | ~50 MB | Does not manage the context window — set it yourself |
| aider | as Ollama | its own environment via pipx | Sets the context window per request itself |
aider on a CPU-only machine: fine for reading and asking, unreliable for editing. Small models often fail to produce its edit format and report “the LLM did not conform to the edit format” instead of making a change. If you want it to edit anyway, --edit-format whole asks it to rewrite files rather than produce diffs, which a 3b manages far more often.
A.7.3 The checklist
Everything typed goes in the VS Codium integrated terminal (View → Terminal, or Ctrl+`) — never the macOS Terminal app.
Git and GitHub are not part of Session 01. They are set up before Session 02: setup-git-and-github.md.
A.7.4 Connecting Continue to Ollama
Continue’s config lives at ~/.continue/config.yaml:
name: qmib
version: 0.0.1
models:
- name: Local coder
provider: ollama
model: qwen2.5-coder:3b
roles: [chat, edit, apply]
- name: Local embedder
provider: ollama
model: nomic-embed-text
roles: [embed]
context:
- provider: file
- provider: code
- provider: diff
- provider: terminalReplace the model name with whichever you pulled. Test it: open a .py file, select a few lines, press Ctrl/Cmd+L.
A.7.5 Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
ollama: command not found |
Not on PATH yet | Open a new terminal; on Windows restart VS Codium |
| Dependency resolver errors while installing aider | It was installed into .venv, where it competes with the course’s packages |
Install it with pipx instead — see the checklist above |
| Dependency conflicts installing aider, or a build error naming a compiler | Your Python is 3.13 or newer; aider requires <3.13 |
Give aider a 3.12 of its own: pipx install --python python3.12 aider-chat |
pipx or aider n’est pas reconnu / not recognized |
pip install --user writes scripts to a folder Windows does not have on PATH |
py -m pipx … works regardless; py -m pipx ensurepath plus a new terminal fixes PATH itself |
| A newly installed extension or command does nothing | The window or terminal predates the install | Developer: Reload Window; for PATH changes, quit VS Codium and reopen |
Python introuvable / Python was not found (Windows) |
The Microsoft Store alias is shadowing Python | Start → Manage app execution aliases → turn off python.exe and python3.exe, then open a new terminal. Do not install from the Store. |
python3: command not found (Windows) |
There is no python3 on Windows |
Use py. If that is missing too, re-run the python.org installer with Add python.exe to PATH ticked |
| Continue answers nothing | Server not running | ollama serve in a separate terminal |
| Model extremely slow | ollama ps shows 100% CPU — no dedicated graphics card |
Normal on most laptops with the 3b. A larger model will be slower, not faster |
| aider “forgets” the file you gave it | The context window is too small — ollama ps shows it |
Raise it in the Ollama app’s own settings (Settings → Context length), then quit Ollama from the tray or menu bar and restart. The app overrides setx and launchctl, so those appear to do nothing. Linux: systemctl edit ollama.service |
address already in use, or une seule utilisation de chaque adresse de socket |
Ollama is already running; the installer starts it on every platform | Do not run ollama serve. Set the variable, then restart Ollama itself |
connection refused from aider |
Nothing listening on 11434 | Start Ollama — the app on macOS and Windows, sudo systemctl start ollama on Linux |
ModuleNotFoundError inside VS Codium |
Wrong interpreter | Ctrl/Cmd+Shift+P → Python: Select Interpreter → .venv |
pip fails |
Environment not active | Check (.venv) is in your prompt |
| Windows: l’exécution de scripts est désactivée sur ce système | PowerShell’s execution policy blocks Activate.ps1 |
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned — user-scoped, no admin rights, asked once |
Windows: le répertoire n’est pas vide when deleting .venv |
VS Codium holds the interpreter it has selected | Quit VS Codium; delete from a plain PowerShell; cmd /c "rmdir /s /q .venv" as a last resort |
deactivate is not recognised |
Activation defines it, so it exists only inside an active environment | You are not in one. Skip it — the prompt shows (.venv) when you are |
LaTeX shows as raw $...$ |
Preview extension missing | Install Markdown Preview Enhanced; open with Ctrl/Cmd+K V |
| Apple Silicon: slow inference | Rosetta Python | Install the arm64 build |
A.7.6 Rendering the mathematics
The lecture notes use LaTeX. GitHub renders $...$ and $$...$$ natively. In VS Codium, install Markdown+Math or Markdown Preview Enhanced and open the preview with Ctrl/Cmd+K V.
A.7.7 Using the LLM well
The local model is a sparring partner, not an oracle.
- Ask it to argue against you. Its most useful output is an objection you had not considered.
- Verify every factual claim. It states plausible falsehoods with complete confidence, especially about library APIs, statistical results and citations.
- Record what you checked. Every practice deliverable requires at least one documented instance where you caught the model being wrong or unverifiable. This is graded.
You are never penalised for using the model. You are penalised for using it uncritically.
A.8 Setup guide — Git, GitHub, and how you submit work
complete this before Session 02 · budget 45 minutes
Follows on from the Session 01 setup guide. You should already have VS Codium, a Python environment, and Ollama serving a local model.
A.8.1 ⚠️ XX is a placeholder — replace it
Wherever you see XX in a command on this page, or anywhere else in the course, it means your group’s two-digit number. Type your own; do not type the letters XX.
| If you are | you type |
|---|---|
| Group 1 | group-01 |
| Group 7 | group-07 |
| Group 10 | group-10 |
So a student in group 7 running the branch command types:
git checkout group-07not git checkout group-XX. Same for folder paths: groups/A2026/group-07/.
If you do not know your group number yet, you get it in Session 01. Do not guess.
A.8.2 How submission works — read this first
There is one repository for the whole course, and you already have a copy of it as a ZIP from Session 01. You are about to replace that snapshot with a real clone.
github.com/warint/quantitative-methods ← the course repository
│
├── main ← the instructor's branch. You never push to it.
├── group-01 ← group 01 works here
├── group-02 ← group 02 works here
└── group-XX ← your group works here
Your group has one branch, named group-XX. Everything your group produces is committed on that branch and pushed to it, into your group’s own directory:
groups/
└── A2026/ ← the cohort: autumn 2026
├── group-03/
└── group-XX/ ← yours
├── session-02/ ← one folder per practice
├── session-03/
└── ...
groups/A2026/ ships empty. Your group creates its own folder the first time it submits — mkdir -p groups/A2026/group-XX/session-02 — and committing a file inside it is what puts your group in the repository. There is no registration step, and git does not track an empty directory.
Your whole term is one directory, which is how you find in week ten what you wrote in week two. The cohort folder above it is what lets next year’s students start clean rather than on top of you — and it is why the path is A2026 and not just groups/.
Why one repository and not one per group. Your commit history is one of the four records used to check that all three of you did the work, and scripts/assess.py contributions reads it from this repository. Work pushed somewhere else is invisible to it — and invisible work counts as work you did not do.
You do not need to create a repository. You need an account, and the instructor adds you.
A.8.3 Step 1 — Install Git
Check first — you may already have it. In the VS Codium terminal:
git --versionIf that prints a version number, git is installed and you are done with this step.
macOS. Git ships with Apple’s Command Line Tools, so most Macs already have it. If the command above is not found, macOS will offer to install the tools itself — accept — or run:
xcode-select --installYou do not need Homebrew for this course.
Windows. Download from https://git-scm.com/downloads and accept every default. Restart VS Codium afterwards so the new PATH is picked up.
Linux. sudo apt install git, or your distribution’s equivalent.
All commands below go in the VS Codium integrated terminal (View → Terminal, or Ctrl+`), never the macOS Terminal app.
A.8.4 Step 2 — Your identity
git --version
git config --global user.name "Your Full Name"
git config --global user.email "your.name@hec.ca"⚠️ Use your real name and your university email. Commits under
unknown@localhost, or under an email not on the roster, cannot be attributed to you. The contribution report will show you as having done nothing.
Check what you set, and report both values to the instructor in Session 02:
git config --global user.name
git config --global user.emailA.8.5 Step 3 — A GitHub account
- Go to https://github.com and choose Sign up.
- Use an email you will still have after you graduate.
- Choose a username you would put on a CV.
- Verify the email GitHub sends you.
- Enable two-factor authentication when prompted. GitHub requires it.
Then send your GitHub username to the instructor. You cannot push until you have been added as a collaborator, and that is done by hand from the list of usernames.
A.8.6 Step 4 — Clone the course repository
This replaces the Session 01 ZIP. Delete the unzipped folder afterwards so you do not edit the wrong copy.
cd ~/Desktop # macOS / Linux
git clone https://github.com/warint/quantitative-methods.git quantitative-methods
cd quantitative-methodsOn Windows PowerShell, use Set-Location "$HOME\Desktop" for the first line. Then File → Open Folder… and choose the quantitative-methods folder on your Desktop.
Rebuild your environment inside the clone:
python3.12 -m venv .venv # Windows: py -3.12 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtA.8.6.1 Authenticating
On your first push GitHub rejects your account password and asks for a token:
- github.com → avatar → Settings
- Developer settings → Personal access tokens → Tokens (classic)
- Generate new token, tick the
reposcope, set an expiry - Copy it — it is shown once — and paste it when git asks for your password
git config --global credential.helper storestores it so you are asked once.
A.8.7 Step 5 — Your group branch
One person per group creates it; the others just check it out.
# the first person, once — group 7 shown; use your own number
git checkout -b group-07
git push -u origin group-07# everyone else, after that
git fetch origin
git checkout group-07⚠️ Never
git pushwhile onmain.mainis protected, so the push will be refused rather than cause damage — but check where you are before you commit:git branch --show-current
A.8.8 Step 6 — The round trip
# group 7 shown throughout — substitute your own number everywhere
mkdir -p groups/A2026/group-07/session-02
echo "# Group 07 — session 02" > groups/A2026/group-07/session-02/NOTES.md
git add groups/A2026/group-07/session-02/
git commit -m "Add group 07 notes for session 02"
git pushRefresh the repository page in your browser, switch to your group’s branch, and your file is there.
Each of the three of you does this at least once, from your own machine. Not one per group.
A.8.9 If your group of three is already formed — do a trial run now
Groups are confirmed in Session 04, but if the three of you have already agreed to work together, you can rehearse the whole cycle before class. It takes ten minutes and it removes the one thing that reliably eats practice time: discovering in the room that two of you cannot push.
One person, once. Create the branch and push it:
git checkout -b group-07 # your number, not 07
git push -u origin group-07The other two, after that. Fetch it and switch to it:
git fetch origin
git checkout group-07Then each of you, one at a time, adds a line with your own name and pushes:
git pull # always pull before you start
echo "- Ana tested the push, 2 September" >> \
groups/A2026/group-07/session-02/NOTES.md
git add groups/A2026/group-07/session-02/NOTES.md
git commit -m "Ana: trial push"
git pushWait for each person to finish before the next starts. When all three are done:
git pull
git log --oneline -5You should see three commits, with three different author names. That is exactly what the participation record looks like, and confirming it now is worth more than any amount of reading about git.
If someone’s push is rejected, they almost certainly need to git pull first — someone else pushed in between. That is normal, not a fault; see Working together below.
A.8.10 Working together
A.8.10.1 Pull before you start
git pullMost conflicts come from someone editing a stale copy for two hours.
A.8.10.2 Getting the instructor’s corrections
The course material lives on main and gets fixed during the term. To bring those fixes into your branch:
git fetch origin
git merge origin/mainDo this at the start of each session.
A.8.10.3 Reading a conflict
<<<<<<< HEAD
alpha = 0.05
=======
alpha = 0.01
>>>>>>> origin/main
Delete the markers, keep the version you agree on, then git add and git commit. A conflict is git refusing to guess which of you was right.
A.8.10.4 Commit messages
git commit -m "update" tells nobody anything. Write for whoever reads it in six weeks — usually you:
Fix leakage: move scaler inside the CV pipeline
A.8.10.5 Credit your pair
git commit -m "Add stability bootstrap
Co-authored-by: Partner Name <partner.name@hec.ca>"The contribution report counts co-authors. One person typing does not mean one person working.
A.8.10.6 aider and your history
aider commits automatically after each change it applies, and this course counts commits as evidence of who did the work.
git log --oneline
aider --model ollama_chat/qwen2.5-coder:3b --no-auto-commitsWhat the agent writes is attributed to you. Read the diff before accepting: you are answerable for every line on your branch.
A.8.11 Everyone pushes
There are no assigned roles. All three of you work on the practice together — and all three commit and push from your own machine, every week.
git add -A && git commit -m "..." && git pushpython scripts/assess.py contributions prints a per-member, per-week grid built from the history. A week in which you pushed nothing is visible to everyone, including you.
The presenter for the two-minute report is drawn at random when your group is called, which is why all three of you must understand the whole analysis.
A.8.12 Troubleshooting
| Symptom | Fix |
|---|---|
git: command not found |
Reopen the terminal; on Windows restart VS Codium |
| Password rejected on push | Use a personal access token, not your password |
remote: Permission denied |
You have not been added as a collaborator yet — send your username |
protected branch on push |
You are on main. Check out your group branch |
rejected — non-fast-forward |
git pull first, resolve, then push |
| Committed under the wrong email | Fix git config, tell the instructor; past commits stay wrong |
A.8.13 Before Session 02
A.8.14 For the instructor
Once the usernames are in:
- Settings → Collaborators → Add people — add every student with Write access.
- Settings → Branches → Add branch protection rule for
main: require a pull request, and tick “Do not allow bypassing” off for yourself. Students then cannot push tomain. - Group branches need no protection — a group breaking its own branch is recoverable.
- To review a group’s work:
git fetch origin
git checkout group-07
python scripts/assess.py contributionscontributions reads the history of whatever is checked out, so run it after fetching all branches:
git fetch --all
python scripts/assess.py contributions