Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
(with Python)
Alan Moreira, University of Rochester Simon Graduate School of Business
1
Week 1 road map
Quantitative investing
Computing
o Python: software, resources, and examples
Python basics
Problem set 1
2
Introduction
We will learn the state of the art in quantitative investing, and learn how
to evaluate new quantitative strategies
Develop tools and programing skills that can be applied widely: asset
management, investment banking, corporate finance, strategy
3
What is quantitative investing?
Use of data (and theory) to systematically construct portfolios
4
Does the media attention reflect investor appetite?
Yes, interest among Institutional and Advisory clients is growing
Source: Smart Beta: 2015 global survey findings from asset owners, FTSE Russell 4Q 2015
The number of managers and products is growing rapidly
Investors may be overwhelmed as more asset managers launch products
48%
of US Asset Managers are planning to launch
smart beta strategies to counter the growing
interest in passive investments*
With the increasing number of players, investors may get confused by the variety of labels, along with competing and
overlapping products.
The industry has agreed on little other than the idea that smart beta is generally about investing in factors or styles, but
there is less consensus regarding which factors are valuable.
An open question is whether Smart Beta is a form of index investing or active investing?.
Source: 2015 Product Management & Development Benchmark Survey, Fuse Research Network
Recent Entrants include some well known Asset Managers
Fundamental active managers are entering to compete with passive
Fidelity and FranklinTempleton are among the most recognized firms to announce plans to create new ETFs
BlackRock has a broad suite of single factor and multi-factor funds and is a leader in Minimum Volatility
Vanguard only offers dividend funds, but dominates flows in the category due to low fee
WisdomTree, First Trust and Guggenheim have all created proprietary index methodologies
Quantitative Investing
transparent
High Capacity
9
Quantitative investing requires data analysis and computing power
10
Are you ready?
We will now spend 3 weeks learning how to code and we will slowly
introduce finance concepts
All useful knowledge takes time to build. Trust me when I tell you: These
skills are very useful in the finance world
Lets go! 11
Computing: Why code?
Why Python?
o Interactive
You type directly to Python one line at a time and it responds
o Script
You enter a sequence of statements (lines) into a file using a text editor and tell Python to
execute the statements in the file
o Jupyter notebook
Something in between: interactive, but scale relatively well
We will use Jupyter notebook in this class. I suggest you do the same 15
Python resources
o https://www.codecademy.com/learn/python
o https://lectures.quantecon.org/py/index.html
16
Course mechanics
Every week
o Powerpoint slides
5 grades: ++,+,0,-,--
You get (_ if you do not deliver anything, (- -) if you cheat (or aided someone cheating)
17
Course mechanics
Two groups
o Rochester students
In-class participation expected
o Remote students
Class video available immediately after class
Ask question through Piazza forums: I and TAs promise prompt reply
I will host weekly video office hours, TAs will host office hours dedicated to online students
18
Course mechanics
Piazza
o You can ask questions
o But I encourage name disclosure so you are rewarded for your participation
Module 2: (Week IV-V) Portfolios: Theory, Practice and Evaluation (Class 7-10)
Module 3: (Week VI) Market Efficiency and Limits to Arbitrage (Class 11-12)
Module 4: (Week VII): Portfolio construction and Factor investing (Class 13-14)
(Class 15-18)
20
Python Basics
21
Some Python code
x = 2
x = x + 2
print(x)
22
Some Python code
x = 2 variable
x = x + 2
print(x) constant
23
Variable Names
24
Variable Names
27
Appendix
28
Program Flow
Some steps are stored and used all around through our program
29
Sequential Steps
x=2 Program:
Output:
print(x) x = 2
print(x) 2
x=x+2 x = x + 2 4
print(x)
print(x)
print('Smaller') Program:
No Output:
x = 5
Yes if x < 10: Smaller
x > 20 ? print('Smaller') Finis
if x > 20:
print('Bigger') print('Bigger')
No
print('Finis')
print('Finis')
n=5 Repeated Steps
No Yes Output:
n>0? Program:
5
print(n) n = 5 4
while n > 0 :
print(n)
3
n = n -1 n = n 1 2
print('Blastoff!') 1
Blastoff!
Loops (repeated steps) have iteration variables that
print('Blastoff')
change each time through a loop.