Title: Fast Portfolio Computations
1Fast Portfolio Computations
- Thomas F. Coleman
- Dean, Faculty of Mathematics
- Professor, Combinatorics and Optimization
- University of Waterloo
2Alternative title
3- Portfolio Speed with Brains or Brawn?
or
4Portfolio Trends
- Larger and more complex portfolios
- Less restrictive assumptions ? simulations
required - Movement to real-time/near-time computations ?
(semi-) automated trading systems - Complex hedging strategies (long-dated)
- Increased competitiveness
- Increased regulatory requirements (e.g.,
VaR-related) - Increased appreciation of robustness properties
- (more) speed is needed
-
5- Should (increased) speed be achieved by
- Brains
- Or
- Brawn.
6Speed by Brains
- Many portfolio computations are structured ?
structure can be used to extract speed. - Speed gains can be stunning
- Textbook codes will not do
- Packages will (likely) have to be tailored
- Hire an expert in computational mathematics,
scientific computing, practical optimization -
7A (very) Simple Example
- Background
- Solving systems of linear equations fundamental
to everything (computational) -
Ax b - If A is n-by-n,
- If A is sparse (i.e., mostly zero),
- (eg work n, or work n?logn).
8A (very) Simple Example
- Background
- Solving systems of linear equations fundamental
to everything (computational) -
Ax b - If A is n-by-n,
- If A is sparse (i.e., mostly zero),
- (eg work n, or work n?logn).
!
!
!
9Comparing Costs
10Example continued
11Example continued
sparse
Note A is dense!
12Solve Axb
13(No Transcript)
14Solve Axb
15Comparing Costs
16Matlab experiment T tridiagonal
Speedup
n
Subtle
Straight
1000
1.4
.06
23
5000
1200
.1
120
17Application to Portfolio Optimization (simplified)
- Portfolio optimization often contains the form
18Application to Portfolio Optimization (simplified)
- Portfolio optimization often contains the form
n-by-n
t
n
19Application to Portfolio Optimization (simplified)
- Portfolio optimization often contains the form
n-by-n
t
n
t ltlt n
20Application to Portfolio Optimization (simplified)
- Portfolio optimization often contains the form
Covariance
(OPT)
n-by-n
t
Additional linear relationships
n
21Solution
22Factor Assumption
- Many portfolio modelers make a factor assumption
- Assume q risk factors,
- Q
Residual risk mtx. Diagonal
Covariance mtx of risk factors. q-by-q
23Factor Assumption
- Many portfolio modelers make a factor assumption
- Assume q risk factors,
- Q
Residual risk mtx. Diagonal
Covariance mtx of risk factors. q-by-q
24Factor Assumption
- Many portfolio modelers make a factor assumption
- Assume q risk factors,
- Q
Structure!
Covariance mtx of risk factors. q-by-q
25Solve OPT
26Solve OPT
- Method 2 (Subtle)
- Form Matrix C, vector d.
- Solve Cy d (a standard dense solve)
- Form b
- Solve (a diagonal system!)
-
-
27(qt)-by-(qt)
28Solve OPT
- Method Subtle
- Form Matrix C, vector d.
- Solve Cy d (a standard dense solve)
- Form b
- Solve (a diagonal system!)
-
-
29Solve OPT
- Method Subtle
- Form Matrix C, vector d.
- Solve Cy d (a standard dense solve)
- Form b
- Solve (a diagonal system!)
-
- Note!
30Comparing costs
n
31Speedup
n
Subtle
Straight
1000
1.4
.06
23
5000
1200
.1
120
32Speed by Brawn
- Just evaluation of a portfolio (sensitivities)
can be very expensive e.g., portfolios of
derivatives may require extensive simultations - VaR..
- Optimization including VaR
33- How to calculate future portfolio prices/hedging
solutions/sensitivities from an Excel spreadsheet
with existing modest resources FAST - An expensive supercomputer is not required.
- Moving to a specialized environment is not
necessary!
34Example questions you may be afraid to ask now
(because you wont get an answer in useful
time/reasonable cost)
- How will my portfolio value change under a shift
and a twist in the yield curve? How are VaR/CVaR
affected? - In a range of possible yield curve scenarios,
with a range of possible stock values, what are
the worst-case scenarios for my portfolio of
convertibles 3 months from now, 6 months from
now? - How sensitive is my portfolio to default of the
bond holders?
35Our Solution Framework
- Use parallelism, under .Net/web services.
The Environment
36Why .NET/webservices?
- (Increasingly) commonly available.
- A commodity environment not specialized and
expensive. - Rich master environment all the familiar
tools are available. - The parallel back-end can be many things a
shared resource existing resource, a collection
of workstations, a dedicated rack of
processors,the only requirement is that they be
identified as web servers
37Some of the problems amenable to this (brawny)
approach
- Computing the fair price of portfolios of
financial instruments - Future values under different scenarios.
- Computing sensitivities to various risk factors
- Hedging, hedging, hedging.
- Value at risk, Conditional value-at-risk!!
Dont cheat!
38Example Pricing Portfolios of Complex Bonds (on
a Windows cluster, under .Net, using Web Services)
39Pricing a callable bond
- Very complex to price American style feature
exercise decision and current value depend on
stochastic interest rates - Least Squares Monte Carlo (LSM)
- Longstaff and Schwartz (2001)
- Equips Monte Carlo method with regression
analysis to compute fair prices of any future
cash flow. - Callable bond price Non-callable bond price
call option price
40demo
41Concluding Remarks
42A Hierarchy
Increasing computational cost
- Price a complex bond
- Price a portfolio of complex bonds
- Compute VaR of the portfolio
- Optimize
43A Hierarchy
Increasing computational cost
- Price a complex bond
- Price a portfolio of complex bonds
- Compute VaR of the portfolio
- Optimize
44A Hierarchy
Increasing computational cost
- Price a complex bond
- Price a portfolio of complex bonds
- Compute VaR of the portfolio
- Optimize
45A Hierarchy
Increasing computational cost
- Price a complex bond
- Price a portfolio of complex bonds
- Compute VaR of the portfolio
- Optimize
46Thank you for listening!
- Feel free to email me with any questions, etc
- tfcoleman_at_uwaterloo.ca