HIT · CS Concentrations

COURSE · QCF2

AI & Optimization for Finance

בינה מלאכותית ואופטימיזציה למימון

portfolio theory, stochastic models, and machine learning for quantitative strategies

AI, optimization, and risk for modern quantitative finance

Year 313 weeks2h lecture + 2h practiceProject-based

About this course

Apply machine learning and optimization to financial problems such as pricing, portfolio construction, and algorithmic trading.

Course format. Thirteen weeks, four contact hours each: a two-hour lecture (concepts and theory) and a two-hour practice session. The course is project-based; teams carry one running project end to end and present it three times, in weeks 5, 8, and 13.
What you will build

Built a reproducible quantitative research pipeline in Python with cvxpy, PyPortfolioOpt, scikit-learn, and vectorbt that constructs risk-aware optimized portfolios, adds machine learning signals, and rigorously backtests a cost-aware trading strategy under purged cross-validation.

Expected outcomes

  • Derive mean-variance portfolio theory and the efficient frontier from first principles
  • Formulate portfolio construction as convex optimization with realistic constraints
  • Explain Brownian motion, Ito calculus, and the stochastic processes underlying asset prices
  • Build and validate risk models including value at risk and expected shortfall
  • Engineer financial features and labels while avoiding leakage and lookahead bias
  • Apply machine learning models to return prediction and signal generation
  • Design and backtest algorithmic trading strategies with transaction costs
  • Apply purged cross-validation and combinatorial backtesting to control overfitting
  • Optimize execution and rebalancing under uncertainty and turnover limits
  • Deliver a reproducible research pipeline from data to evaluated strategy

Key topics

  • Portfolio optimization
  • Algorithmic trading
  • Risk modeling
  • Machine learning for finance

Theoretical foundations

The concepts and results this course rests on.

  • mean-variance portfolio theory and the efficient frontier
  • convex optimization, quadratic programs, and duality
  • Brownian motion, Ito's lemma, and stochastic differential equations
  • risk-neutral pricing and the Black-Scholes-Merton framework
  • coherent risk measures, value at risk, and expected shortfall
  • statistical learning theory and time-aware cross-validation
  • backtest overfitting and the multiple-testing problem

Prerequisites

This is a Year-3 course. It assumes the mandatory CS core: data structures and algorithms, operating systems, computer networks, databases, software engineering, and the core mathematics (linear algebra, probability and statistics, calculus, discrete mathematics). It additionally requires the specific prior courses listed below.

Course-specific prerequisites:

  • Machine Learning
  • Probability and statistics
  • Calculus and convex optimization

Weekly schedule 13 weeks · lecture + practice

Foundations
Wk 1
Markets, data, and returns
LectureAsset classes, price and return definitions, log returns, stylized facts of financial time series, and stationarity. Data quality and survivorship bias.
PracticeSet up the environment and load, clean, and resample market data into return series with pandas.
ProjectInitialize the project repository and assemble a clean multi-asset return dataset.
Probability foundations
Wk 2
Stochastic processes and Brownian motion
LectureRandom walks, Brownian motion, martingales, and the construction of continuous-time price processes. Properties of Wiener processes.
PracticeSimulate Brownian motion and geometric Brownian motion price paths and study their statistics.
ProjectAdd a Monte Carlo price simulator to the project toolkit.
Wk 3
Ito calculus and pricing intuition
LectureIto's lemma, stochastic differential equations, geometric Brownian motion, and the Black-Scholes-Merton framework as risk-neutral pricing.
PracticeImplement Ito-based simulation and a Black-Scholes pricer, comparing to Monte Carlo estimates.
ProjectIntegrate a stochastic model used later for scenario generation.
Portfolio theory
Wk 4
Mean-variance optimization
LectureExpected return and covariance estimation, the mean-variance objective, the efficient frontier, and the tangency portfolio. Assumptions and limitations.
PracticeEstimate the covariance matrix and compute the efficient frontier for the project universe.
ProjectProduce a baseline mean-variance portfolio for the project assets.
Wk 5
Convex optimization for portfoliosPresentation
LectureConvex sets and functions, quadratic programs, duality, and constrained portfolio formulations with budget, long-only, and turnover constraints.
PracticeTeam presentation of the project specification: universe, objective, constraints, and evaluation plan.
ProjectDeliver the written and oral project specification milestone.
Wk 6
Robust and advanced allocation
LectureEstimation error, shrinkage, Black-Litterman views, risk parity, and hierarchical risk parity. Why naive optimization fails out of sample.
PracticeImplement risk parity and a shrinkage-based optimizer with cvxpy and compare allocations.
ProjectAdd robust allocation variants to the project portfolio engine.
Risk modeling
Wk 7
Value at risk and expected shortfall
LectureRisk measures, coherence, historical, parametric, and Monte Carlo value at risk, expected shortfall, and backtesting risk estimates.
PracticeCompute and backtest value at risk and expected shortfall for the project portfolio.
ProjectAdd a risk reporting module to the project.
Wk 8
Volatility, correlation, and stressPresentation
LectureGARCH volatility, dynamic correlation, tail dependence, and stress and scenario testing for portfolio risk.
PracticeTeam interim presentation: portfolio engine, risk results, and open questions.
ProjectDeliver the interim presentation milestone with risk-aware portfolios.
Machine learning for finance
Wk 9
Features, labels, and leakage
LectureFinancial feature engineering, fractional differentiation, the triple-barrier labeling method, sample weighting, and avoiding lookahead bias.
PracticeEngineer features and triple-barrier labels for the project assets.
ProjectBuild the labeled supervised dataset for the project.
Wk 10
Models and purged cross-validation
LectureTree ensembles and regularized models for finance, feature importance, and purged and embargoed cross-validation to respect time structure.
PracticeTrain models with purged cross-validation and evaluate predictive signal quality.
ProjectProduce a validated predictive signal for the strategy.
Algorithmic trading
Wk 11
Strategy design and execution
LectureSignal to position mapping, bet sizing, transaction costs, slippage, and execution and rebalancing under turnover limits.
PracticeConvert the predictive signal into a traded strategy with sizing and cost modeling.
ProjectImplement the trading strategy layer on top of the signal.
Wk 12
Backtesting and overfitting
LectureBacktest design, walk-forward and combinatorial purged cross-validation, the deflated Sharpe ratio, and the dangers of selection bias.
PracticeRun a rigorous backtest with cost and risk controls and compute performance statistics.
ProjectFinalize the backtest, metrics, and figures for the project.
Capstone
Wk 13
Final strategy defensePresentation
LectureCourse synthesis: integrating optimization, risk, and machine learning into a defensible quantitative strategy and the limits of backtested evidence.
PracticeTeam final presentation with oral defense of methodology, results, and design choices.
ProjectDeliver the final report, code, and backtest with oral defense.
AI tools in this course.

Students use AI coding assistants to vibe-code the quantitative research pipeline: generating pandas data-cleaning steps, drafting cvxpy and PyPortfolioOpt optimization models, and refactoring backtest loops from plain-language strategy specifications. They have the assistant call tools and MCP servers to pull and validate market data, generate synthetic price scenarios and unit tests that guard against lookahead bias and leakage, and scaffold scikit-learn pipelines with purged cross-validation. AI also helps evaluate and analyze results, computing and interpreting risk metrics, deflated Sharpe ratios, and backtest diagnostics, and challenging overfit strategies before they are defended.

Student project

Teams build one end-to-end quantitative investment strategy for a chosen asset universe. Starting from clean data they construct optimized, risk-aware portfolios, add machine learning signals, and turn the result into a cost-aware algorithmic strategy that is rigorously backtested and defended.

Requirements

  • Build a working system, not a set of disconnected exercises.
  • Be original: a new system that solves a real problem, not a re-implementation of a tutorial or course demo.
  • Show real depth: real data, real users or realistic load, and engineering trade-offs that are measured rather than assumed.
  • Carry one running project from specification to a deployed, defensible result across the whole term.
  • Work in a team of three or four and defend the design at each of the three presentations (weeks 5, 8, and 13).

Example projects

Equity factor portfolioRisk parity multi-asset fundMomentum trading strategyMean-reversion pairs tradingCrypto portfolio with risk limitsMachine learning signal long-short bookVolatility-targeted allocationTail-risk hedged portfolio

Assessment & grading

Grading is project-based, with no written exam. Teams of three or four present one running project three times.

ComponentWhat it coversWeight
Project · SpecificationPresentation 1 (week 5): problem, objectives, and architecture20%
Project · InterimPresentation 2 (week 8): the working system demonstrated live30%
Project · FinalPresentation 3 (week 13): end-to-end demo with oral defense50%

Tools & platforms

  • pandas: financial data wrangling and time series
  • NumPy: numerical computation and returns math
  • cvxpy: convex portfolio optimization models
  • PyPortfolioOpt: mean-variance, Black-Litterman, and risk models
  • scikit-learn: machine learning models and cross-validation
  • statsmodels: regression, time series, and volatility models
  • arch: GARCH volatility and risk estimation
  • vectorbt: vectorized backtesting of strategies
  • yfinance: market data acquisition for prototyping
  • Matplotlib: performance and risk visualization
  • SciPy: optimization and statistical routines
  • Jupyter: interactive notebooks for the running project

Free online courses

Existing free, video-based courses this course can build on, for self-study or as a teaching basis.

In Hebrew · בעברית

Primary literature

Seminal works to read for graduate-level depth.

References

Books and resources link to an online or publisher page.

Role in each concentration

ConcentrationRole
Intelligent Software SystemsElective
Networking & Cyber SecurityElective
AI & RoboticsElective
AI and Quantum Computing for FinanceCore · Semester 2
Immersive Systems & Game DevelopmentElective
Defense Technologies & Autonomous SystemsElective