Python for Finance

 Home   Teaching  Finance  Programming  Data  Links

A 15-week's online course

  • FNCE451 (fall 2023): syllabus | textbook (2017)
  •                 slide |     Chapter pdf |    videos | code
  • Week #1: Chapter 01 : R installation/basics | v1 | v2 | code
  •                 Chapter 16: Open Data | v1 | v2 | code
  • Week #2, C02: Simple function, data input v1 | v2 | code
  •                 C17: Finance review, several decision Rules
  • Week #3, C03: Simple data manipulation
  •                 C18: Modern financial statement analysis
  • Week #4, C04: R loops, if else, if else if
  •                 C19: Various distributions and hypothesis tests
  • Week #5, C05:data output
  •                 C20: Hypothsis tests
  • Week #6, C06: Linear regressions
  •                 C21: CAPM, Multi-factor models (ff3, ffc4, ff5)
  • Week #7, C07: Data frame and list
  •                 C22: Option theory, Black-Scholes model
  • Week #8, C08: subset, combine data sets, and merge
  •                 C23: Binomial Tree Method for option
  • Weem #9,C09: date variable,simple plots and graphs
  •                 C24: Monte Carlo Simulation
  • Week #10, C10:Matrix manipulation
  •                   C25: Durbin-Watson,Normality,Granger causality
  • Week #11, C11:Simple string manipulation
  •                   C26: VaR (Value-at-Risk)
  • Week #12, Reading Excel,SAS,binary data and zip files
  •                   C27: Portfolio Theory (I): Markowiz optimization
  • Weel #13,C13: Introduction to R packages
  •                   C14: Two-dozen R packages related to finance
  •                   C28: Portfolio(II):Black-Litterman, Broadt et al.
  • Week #14, C15:Advanced string manipulation
  •                   C29: Bid-ask spread and TAQ (Trade and Quote)
  • Week #15, C30: Term projects

R installation: click here, click 'CRAN',[choose a mirror],[choose PC or Mac], then click "base"

Supporting materials for 15 weeks

    After launching R, issue one of the following lines.
  • source("http://datayyy.com/python/week1.txt")
  • source("http://datayyy.com/python/week2.txt")
  • ..............................................................
  • source("http://datayyy.com/python/week15.txt")

Videos for 30 chapters

For the data used for this course, click here . For any questions or suggestions, please contact me at pyan@geneseo.edu, or click here