You are on page 1of 20

COMPUTATIONAL

FINANCE
CHAIYAKORN YINGSAEREE
CHAI.YINGSAEREE@GMAIL.COM
10
th
June 2013 Chulalongkorn University
Outline
What is Computational Finance / Why we
need it?
Techniques in Computational Finance
Case Study: Algorithmic Trading
Conclusion

These give raise to
Computation Finance


A cross disciplinary field that utilizes
computational methods to solve problem in
finance and economics




Why Computational Finance?
Business Reason
More profit
Why Computational Finance?
Academic Reason
Use traditional statistics and analytical
methods
Make several assumptions to simplify the
problem
Traditional Methods
-0.15 -0.10 -0.05 0.00 0.05 0.10 0.15
0
.
0
1
0
.
0
5
0
.
5
0
5
.
0
0
5
0
.
0
0
Log Return
D
e
n
s
i
t
y
Computational Finance
Use modern computational
methods
Make as less assumptions as
possible
Modern approximation techniques
to solve complex problem
Modern data analysis techniques
to model complex data
Log-Return Probability

Happened once in

< -6.00%
1.98 x 10
-5
50,364 days

< -7.00%
8.31 x 10
-7
1,202,951days

< -8.00%
2.22 x 10
-8
44,983,759 days

Log return of SET index
1975 2013
9,360 Samples
mean = 2.93 x 10
-4
s.d. = 1.47 x 10
-2
Outline
What is Computational Finance / Why we
need it?
Techniques in Computational Finance
Case Study: Algorithmic Trading
Conclusion

Common Techniques in CF
Optimization
Regression
Classification

Optimization Problem
Find the best variables satisfying a given
constraints that maximize (minimize) the
objective function
x
f(x)
solution
constraint
variables
Analytical Approach
First order condition, Lagrange
Multipliers
Numerical Analysis
Gradient decent, Simplex Algorithm
Artificial Intelligence
Genetic Algorithm, Ant Colony
Optimization
Reinforcement learning
0 1 2 3 4 5
0
1
0
0
2
0
0
3
0
0
4
0
0
x
f
(
x
)
Regression Problem
Learn to imitate a function y = f(X) from a finite
set of noisy example { (X
1
,y
1
), (X
2
, y
2
), }
0 1 2 3 4 5
0
1
0
0
2
0
0
3
0
0
4
0
0
x
f
(
x
)
Traditional Approach
Linear regression, ARMA Model
Computational Statistics
Gaussian processes
Artificial Intelligence
Neural Network, Support Vector
Regression
Genetic Programming

Classification Problem
Learn to imitate a function y = f(X) to classify
an object X into k predefined categories
Traditional Approach
Probit/Logit Model
Computational Statistics
Bayesian Classifier
Artificial Intelligence
Decision Tree, k-Nearest Neighbor
Neural Network, Support Vector Machine

Outline
What is Computational Finance / Why we
need it?
Techniques in Computational Finance
Case Study: Algorithmic Trading
Conclusion

Case Study: Algorithmic Trading
Stock Selection
Traditional Approach
Fundamental Analysis
Technical Analysis
Computational Finance Approach
Regression
Classification
Stock Selection: Traditional
Approach
Price & Volume

Charts
Short-term
Trading
Buy if the trend is up
Quantitative & Qualitative
factor
Financial Statement
Long-term
Investing
Buy if current price is less
than fundamental value
Technical Analysis Fundamental Analysis
Focus

Data
Time
Goal
Criteria
Stock Selection: CF Approach
Fundamental & Technical
Data
Future returns


Buy if future return > th

Fundamental & Technical
Data
Whether stock will have
more than k% return in the
next d days or not
Buy if it is more likely to
has k% return

Regression Classification
Input

Output


Criteria
Portfolio Optimization:
Mean Variance Optimization
Framework
Assumption
The return of each asset is a random variable

Input
Expected return of each asset R
The correlation matrix between these asset O
Risk tolerance parameter
Output
The weight that we should invest in each asset w
i

0
1 subject to
min arg
>
=
O

i
i
i
T T
w
w
w
w R w w
Mathematical model

>
=
s

otherwise
w
b
k b
i
i
i
i
0
0 if 1
cardinality
constraint
Trade Execution: Trade Schedule
Sell the shares
immediately
Splitting the order into
smaller one and executed
it over time
Volum
e
Bid Offer
Volum
e
2,000 30.00 30.50 4,500
5,000 29.90 30.60 6,000
8,000 29.80 30.70 7,500
9,500 29.70 30.80 8,000
How to sell 60,000 shares in 1 hours?
Trade Execution: Trade Schedule
How to sell 60,000 shares in 1 hours?
Trade Execution: Trade Schedule
Assumption
Asset price follow arithmetic random walk
Input
Time frame t
Volatility of the asset o
Price impact function g(n
i
/t)
Total number of share to trade X
Output
Number of shares to trade in
each period n
i


=
= =
=
|
|
.
|

\
|
|
.
|

\
|
+ = =
K
k
k k
k
N
k
k
k
N
k
k k
n X x
x
n
g XS S n TV
1
1
2 / 1
0
1
t
t c ot
) 1 , 0 ( ~
2 / 1
1
N
S S
k
k k k
c
c ot + =

( )

= >

X n
TV V TV E
k
n
k
, 0 n subject to
) ( max arg
k

|
.
|

\
|

t
t
k
n
g
2
1
2
1
) ( , ) (
k
N
k
k
N
k
k
x TV V
n
g x TV E

= =
=
|
.
|

\
|
= t o
t
t
Conclusion
Computational Finance is a cross disciplinary field
that utilizes computational methods to solve
problem in finance and economics
Common techniques include optimization,
regression and classification
Example applications include Algorithmic Trading,
Financial Forecasting, Bankruptcy Prediction
and Credit Rating

You might also like