---
title: "0.1.3 Course structure, repository and use of AI"
description: "How the course is organized into levels, modules and lessons, when to skip a level, your personal repository and the rules for learning with AI."
url: "https://pythonparatrading.com/en/python-trading-course/level-0/course-structure-and-learning-with-ai/"
lang: "en"
image: "https://pythonparatrading.com/og/en/python-trading-course/level-0/course-structure-and-learning-with-ai.png"
---

# 0.1.3 · Course structure, entry tests, personal repository and learning with AI

> Eight levels, a repository that grows with you and clear rules for using AI assistants without giving up on learning. This lesson explains how to work through the course and what to have ready before module 0.2.

- Course: [Level 0: Python from scratch and a data mindset](https://pythonparatrading.com/en/python-trading-course/level-0/)
- Module: 0.1 · Welcome and expectations
- Duration: 25 min
- Prerequisites: [0.1.1 · Systematic, algorithmic and quantitative trading versus discretionary trading](https://pythonparatrading.com/en/python-trading-course/level-0/systematic-algorithmic-quantitative-trading/)

## By the end of this lesson

- Know the structure of the course (levels, modules, lessons and projects) and choose the path that matches your starting point.
- Use the self-assessments as entry tests to decide whether you can skip a level.
- Set up the structure of the personal repository that goes with you through the whole course.
- Apply the course rules for learning with AI assistants: first without help, then with review and tests.

## Levels, modules and lessons

The course has eight levels, from 0 (Python from scratch) to 7 (production and final project). Each level is divided
into modules and each module into lessons like this one. The figure at the top shows the approximate hours of each
level: the total is around 750–850 hours.

```mermaid
flowchart TB
  L[Lesson] --> E[Exercises] --> A[Self-assessment]
  A --> M{All clear?}
  M -- yes --> S[Next lesson]
  M -- no --> L
  S -. at the end of the level .-> P[Level project]
  P -. at the end of the course .-> C[Final project]
```

Every lesson has the same parts:

- **Objectives** at the start: what you should be able to do when you finish.
- **Content** with runnable code. All the code in the course has actually been run and the outputs you see are real.
  The level 0 data are synthetic (generated with a seed) so that you get exactly the same result.
- **Exercises** with the solution collapsed. Try to solve them before opening it.
- **Self-assessment**: three to five questions with the answer and the reasoning behind it.
- **Key ideas** and **resources** to go deeper.

The levels are cumulative, but you do not have to go through all of them in order. The syllabus proposes four paths
depending on your starting point:

*Fig. — Routes through the course by starting point.* Grid of four profiles by levels. From scratch: levels 0, 1, 2, 4, 3, 5, 6 and 7, in that order. Discretionary trader: entry test and levels 0 to 4, with 5 and 6 optional. Programmer or data scientist: test and levels 1 to 7. Advanced quant: individual modules from levels 3, 5, 6 and 7.

## Entry tests: when to skip a level

Each level has an explicit prerequisite (on the level's page). To find out whether you can skip it, use its
self-assessments as an entry test: go through those of all its lessons without looking at the content. If you answer
all of them correctly and understand the reasoning behind each answer, move on to the next level. If you fail the ones
in a module, do only that module.

Two warnings. First: level 0 looks dispensable for someone who already programs, but it includes tools that have
changed a lot in two years (uv, pandas 3.0, Polars, DuckDB); review at least module 0.5. Second: the self-assessments
measure concepts, not fluency. If a question seems easy but you could not write the exercise code without help, do
not skip the module.

## Your course repository

Everything you write during the course lives in a single Git repository. It starts with a few folders and ends up
being your personal framework: the level 1 functions (data download and cleaning) will be used by the level 2
backtest, and both will be used by the level 4 live system.

The recommended structure, created with `pathlib` (covered in module 0.4; here only the result matters):

```python
import tempfile
from pathlib import Path

raiz = Path(tempfile.mkdtemp()) / "ppt-curso"
carpetas = ["datos/brutos", "datos/procesados", "notebooks", "src/ppt",
            "tests", "informes"]
for carpeta in carpetas:
    (raiz / carpeta).mkdir(parents=True)
(raiz / "src/ppt/__init__.py").touch()
(raiz / "README.md").write_text("# My course repository\n")
ignorar = [".venv/", ".env", "datos/brutos/", "__pycache__/"]
(raiz / ".gitignore").write_text("\n".join(ignorar) + "\n")

for ruta in sorted(raiz.rglob("*")):
    nivel = len(ruta.relative_to(raiz).parts) - 1
    print("    " * nivel + ruta.name + ("/" if ruta.is_dir() else ""))
```
```output
.gitignore
README.md
datos/
    brutos/
    procesados/
informes/
notebooks/
src/
    ppt/
        __init__.py
tests/
```

- `datos/brutos/` (raw data): what you download, as is. It is not versioned (it can be large and sometimes its license
  does not allow redistribution); it can be downloaded again.
- `datos/procesados/` (processed data): clean data, in Parquet from level 1 on.
- `notebooks/`: exploration. Whatever works in a notebook is moved to `src/`.
- `src/ppt/`: your reusable code, as a Python package.
- `tests/`: tests with pytest (lesson 0.4.5).
- `informes/` (reports): the reports the projects generate.

In practice it is not created with Python, but with uv and Git from the terminal. You will do it in module 0.2; these
are the commands, so that you recognize them:

```bash
uv init ppt-curso          # project with pyproject.toml (lesson 0.2.2)
cd ppt-curso
git init                   # repository (lesson 0.2.5)
git add .
git commit -m "Initial course structure"
```

<aside class="callout" data-kind="riesgo">

Never push API keys to a repository, not even a private one. A commit with a key stays in the history even if you
delete the file afterwards: you have to revoke the key and create a new one. Keys go in a `.env` file that is in
`.gitignore` from the first commit (lesson 0.2.4).

</aside>

## Learning with AI: the course rules

Coding assistants (Copilot, Claude Code, Codex, Cursor) write in seconds functions that take a beginner an hour. That
makes them very useful for someone who can judge the result and dangerous for someone who cannot: the code they
generate is plausible, and plausible is not the same as correct. In trading, a plausible mistake (a signal shifted one
day too many or too few, a forgotten cost) produces a pretty backtest and a strategy that loses money.

That is why the course has three rules:

1. **Level 0 without an assistant.** Write and read the code of this level yourself. You can ask a chat conceptual
   questions, but do not ask for the code of the exercises.
2. **Afterwards, the AI proposes and you decide.** From level 1 on, use assistants with a fixed workflow: first you
   write the test the code must pass, then you ask for the code, read it in full, run the tests and only then commit.
3. **Nothing sensitive in the prompt.** No keys, no data whose license does not allow sharing it, no personal data.

```mermaid
flowchart TB
  T[You write the test] --> P[You ask for the code] --> L[You read it in full]
  L --> X{Do the tests pass?}
  X -- no --> P
  X -- yes --> C[Commit]
```

Lesson 0.2.6 returns to assistants in more detail, and level 6 devotes an entire module to using them as a research
copilot.

## Exercises

1. Choose your path. Using the paths figure and each level's page, write in your repository's `README.md` (or in a
   note, if you do not have it yet) which level you start at, which levels you will do in full and which ones only in
   part.

**Solution.**

There is no single answer. A good answer cites the prerequisite of each level you skip and why you meet it. For
example: "I start with all of level 0: I have never programmed. Then 1, 2 and 4, as in the beginner path; I will do 3
only with futures, which is what I trade."

2. Write your repository's `.gitignore`. Besides what the lesson covers, what other things should not be versioned in
   a trading project?

**Solution.**

Besides `.venv/`, `.env`, `datos/brutos/` and `__pycache__/`: the state files of a live system (positions, orders),
logs, large notebook outputs, configuration files with broker account details and the editor's system files
(`.vscode/`, `.idea/`) unless you share them on purpose. The rule: do not version what is secret, what can be
regenerated or what is very large.

3. Ask an AI assistant for a Python function that computes the daily return of a price series, without giving it any
   more context. Before reading the answer, write three questions whose answer should be in the code.

**Solution.**

Some: does it use the adjusted or the unadjusted close (dividends and splits, level 1)? Simple or log return (lesson
0.7.1)? What does it do with the first day, which has no previous day? Does it sort the series by date or assume it
is already sorted? What happens if there are gaps or repeated prices? If the code does not answer one of them, the
assistant has made the decision for you without telling you: that is the reason to read it in full.

## Self-assessment

1. You already program in Python and use pandas every day, but you do not know the markets. Where do you start?

   - A. With lesson 0.1.1 and all of level 0 in order
   - B. With the level 0 self-assessments; if you pass them, with level 1
   - C. With level 5, the machine learning one
   - D. With the final project

   *Answer B: With the level 0 self-assessments; if you pass them, with level 1.* The programmer or data scientist path starts with the test and enters at level 1, which is where the markets are. The level 0 self-assessments are there to check it.

2. What must never go into the course repository?

   - A. The notebooks
   - B. The tests
   - C. The `README.md`
   - D. The `.env` file with API keys

   *Answer D: The `.env` file with API keys.* A key pushed to a repository, even a private one and even if it is deleted later, must be treated as compromised: it stays in the Git history. That is why `.env` goes in `.gitignore` from the first commit.

3. According to the course rules, when do you start using an AI coding assistant?

   - A. From the first lesson, to go faster
   - B. Never
   - C. After level 0, once you can write and read code without help, and always with review and tests
   - D. Only in the final project

   *Answer C: After level 0, once you can write and read code without help, and always with review and tests.* An assistant speeds up someone who can judge its output. Level 0 is where you learn to write and read code; from then on, the AI proposes and you review, test and version.

## Key points

- The course has 8 cumulative levels; each level ends with a project and the course with a final project.
- A level's self-assessments work as an entry test: if you pass all of them, you can skip it.
- A single Git repository grows throughout the course and ends up being your personal framework.
- Keys and raw data are never committed: `.env` and `datos/brutos/` go in `.gitignore` from the first commit.
- The AI proposes, you decide: first without an assistant; then with review, tests and version control.

## Resources

### Documentation

- [Python Trading Course: map of levels and paths](https://pythonparatrading.com/en/python-trading-course/) · pythonparatrading.com
- [uv: working on projects (official documentation)](https://docs.astral.sh/uv/guides/projects/) · docs.astral.sh
- [Pro Git: recording changes to the repository](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) · git-scm.com
- [GitHub Docs: ignoring files with .gitignore](https://docs.github.com/en/get-started/git-basics/ignoring-files) · docs.github.com
- [GitHub Docs: about secret scanning](https://docs.github.com/en/code-security/secret-scanning/introduction/about-secret-scanning) · docs.github.com

Previous lesson: [0.1.2 · Realistic expectations: costs, time and risk of loss](https://pythonparatrading.com/en/python-trading-course/level-0/realistic-trading-expectations-costs-risk/)

Next lesson: [0.2.1 · Installing Python with uv: versions and support cycle](https://pythonparatrading.com/en/python-trading-course/level-0/install-python-with-uv/)
