Top Banner
. . . . . . AWS in Academic Finance High Performance Modeling Stephen J. Barr [email protected] University of Rochester March 24, 2012
71

Barr cc slides

Aug 05, 2015

Download

Education

stephenjbarr
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Barr cc slides

. . . . . .

AWS in Academic FinanceHigh Performance Modeling

Stephen J. [email protected]

University of Rochester

March 24, 2012

Page 2: Barr cc slides

. . . . . .

Welcome

Welcome!

I Glad to be here at Rochester Cloud Camp 2012

I I am a PhD student at the Simon School of Business,University of Rochester

I Presenting a bit of my research, and how I use AWS daily forfinancial models

Page 3: Barr cc slides

. . . . . .

Welcome

Welcome!

I Glad to be here at Rochester Cloud Camp 2012

I I am a PhD student at the Simon School of Business,University of Rochester

I Presenting a bit of my research, and how I use AWS daily forfinancial models

Page 4: Barr cc slides

. . . . . .

Welcome

Welcome!

I Glad to be here at Rochester Cloud Camp 2012

I I am a PhD student at the Simon School of Business,University of Rochester

I Presenting a bit of my research, and how I use AWS daily forfinancial models

Page 5: Barr cc slides

. . . . . .

Quick Overview

First 5-7 minutes

I My research question

Remaining time

I How I use AWS daily in my research

Page 6: Barr cc slides

. . . . . .

Quick Overview

First 5-7 minutes

I My research question

Remaining time

I How I use AWS daily in my research

Page 7: Barr cc slides

. . . . . .

Research Question

I My area of interest is financial capital structure, meaninghow firms use debt and equity issuance to financethemselves

I Main quantities of interest are leverage and investment rates

Leverage =net debt

total assets

The main goal of this line of research is to explain the dynamicsof leverage and investment in the face of uncertainty.

Page 8: Barr cc slides

. . . . . .

Research Question

I My area of interest is financial capital structure, meaninghow firms use debt and equity issuance to financethemselves

I Main quantities of interest are leverage and investment rates

Leverage =net debt

total assets

The main goal of this line of research is to explain the dynamicsof leverage and investment in the face of uncertainty.

Page 9: Barr cc slides

. . . . . .

Research Question

Rather than talk, lets just put together a simple model.Modeling Principles

I Take as many simplifications as possible

I Based on economic principles

I Rather than forcing the firm to follow rules about investmentor leverage, the firm chooses the value-maximizing behaviourgiven reasonable incentives

I Firm’s incentive: maximize equity value

Page 10: Barr cc slides

. . . . . .

Research Question

Rather than talk, lets just put together a simple model.Modeling Principles

I Take as many simplifications as possible

I Based on economic principles

I Rather than forcing the firm to follow rules about investmentor leverage, the firm chooses the value-maximizing behaviourgiven reasonable incentives

I Firm’s incentive: maximize equity value

Page 11: Barr cc slides

. . . . . .

Research Question

Rather than talk, lets just put together a simple model.Modeling Principles

I Take as many simplifications as possible

I Based on economic principles

I Rather than forcing the firm to follow rules about investmentor leverage, the firm chooses the value-maximizing behaviourgiven reasonable incentives

I Firm’s incentive: maximize equity value

Page 12: Barr cc slides

. . . . . .

Research Question

Rather than talk, lets just put together a simple model.Modeling Principles

I Take as many simplifications as possible

I Based on economic principles

I Rather than forcing the firm to follow rules about investmentor leverage, the firm chooses the value-maximizing behaviourgiven reasonable incentives

I Firm’s incentive: maximize equity value

Page 13: Barr cc slides

. . . . . .

Research Question - Math - I

e(k , k ′, b, b′, z) = (1)

zkθ Profit (2)

+ p′ − (1− r(1− τc)p) New debt + repay old (3)

+ k ′ − (1− δk) Investment (4)

+ A(k, k ′) Capital Adjustment Cost (5)

The function e(·) shows the firm’s financing status.e(·) ≥ 0 the firm make a distribution to shareholders

e(·) < 0 the firm is issuing equity(6)

Page 14: Barr cc slides

. . . . . .

Research Question - Math - II

But, to issue equity, the firm goes to an investment bank. Thisisn’t free.

φ(e(·)) = λ1e(·) + λ2(e(·))2 (7)

The firm wants to make the choices of k ′ and p′ to maximizecurrent plus expected future discounted returns. In math, this iscalled a dynamic programming problem and is expressed as aBellman equation (recursively defined).

V (Kt ,Pt , z∗t ) = (8)

maxKt+1,Pt+1∈K×P

e(Kt ,Kt+1,Pt ,Pt+1, z

∗t ) + φ(e(Kt ,Kt+1,Pt ,Pt+1, z

∗t ))

(9)

+ β

∫V (Kt+1,Pt+1, z

∗)dΓ(z∗t , dz∗t+1)

Page 15: Barr cc slides

. . . . . .

Phew!

Page 16: Barr cc slides

. . . . . .

How do we solve this?

The math and algorithms to solve these programs fall under“dynamic programming”.HUGE ISSUE:

The curse of dimensionality!!!

Page 17: Barr cc slides

. . . . . .

Why is this an issue? - I

For 3 k’s 5, 10, 15 and 2 p’s 2, 4

k =

5 5 5 5 5 55 5 5 5 5 510 10 10 10 10 1010 10 10 10 10 1015 15 15 15 15 1515 15 15 15 15 15

k ′ =

5 5 10 10 15 155 5 10 10 15 155 5 10 10 15 155 5 10 10 15 155 5 10 10 15 155 5 10 10 15 15

p =

2 2 2 2 2 24 4 4 4 4 42 2 2 2 2 24 4 4 4 4 42 2 2 2 2 24 4 4 4 4 4

p′ =

2 4 2 4 2 42 4 2 4 2 42 4 2 4 2 42 4 2 4 2 42 4 2 4 2 42 4 2 4 2 4

Page 18: Barr cc slides

. . . . . .

Why is this an issue - II

1. For sufficient granularity, I need u 71 k ’s and u 29 p’s

2. The above leads to a 2059× 2059 matrix

3. I need one of those for each shock z

4. My z is a combination of two processes...I have 323 of them.

5. I have a (2059× 323)× 2059 matrix of double precisionnumbers sitting in memory

6. This is a 665057× 2059 = 1, 369, 352, 363 element matrix.

Page 19: Barr cc slides

. . . . . .

Why is this an issue - II

1. For sufficient granularity, I need u 71 k ’s and u 29 p’s

2. The above leads to a 2059× 2059 matrix

3. I need one of those for each shock z

4. My z is a combination of two processes...I have 323 of them.

5. I have a (2059× 323)× 2059 matrix of double precisionnumbers sitting in memory

6. This is a 665057× 2059 = 1, 369, 352, 363 element matrix.

Page 20: Barr cc slides

. . . . . .

Why is this an issue - II

1. For sufficient granularity, I need u 71 k ’s and u 29 p’s

2. The above leads to a 2059× 2059 matrix

3. I need one of those for each shock z

4. My z is a combination of two processes...I have 323 of them.

5. I have a (2059× 323)× 2059 matrix of double precisionnumbers sitting in memory

6. This is a 665057× 2059 = 1, 369, 352, 363 element matrix.

Page 21: Barr cc slides

. . . . . .

Why is this an issue - II

1. For sufficient granularity, I need u 71 k ’s and u 29 p’s

2. The above leads to a 2059× 2059 matrix

3. I need one of those for each shock z

4. My z is a combination of two processes...I have 323 of them.

5. I have a (2059× 323)× 2059 matrix of double precisionnumbers sitting in memory

6. This is a 665057× 2059 = 1, 369, 352, 363 element matrix.

Page 22: Barr cc slides

. . . . . .

Why is this an issue - II

1. For sufficient granularity, I need u 71 k ’s and u 29 p’s

2. The above leads to a 2059× 2059 matrix

3. I need one of those for each shock z

4. My z is a combination of two processes...I have 323 of them.

5. I have a (2059× 323)× 2059 matrix of double precisionnumbers sitting in memory

6. This is a 665057× 2059 = 1, 369, 352, 363 element matrix.

Page 23: Barr cc slides

. . . . . .

Why is this an issue - II

1. For sufficient granularity, I need u 71 k ’s and u 29 p’s

2. The above leads to a 2059× 2059 matrix

3. I need one of those for each shock z

4. My z is a combination of two processes...I have 323 of them.

5. I have a (2059× 323)× 2059 matrix of double precisionnumbers sitting in memory

6. This is a 665057× 2059 = 1, 369, 352, 363 element matrix.

Page 24: Barr cc slides

. . . . . .

How to solve

maxK ′,P′∈K×P

e(K ,K ′,P,P ′, z∗) + φ(e(K ,K ′,P ,P ′, z∗)) (10)

+ β

∫V (K ′,P ′, z∗)dΓ(z∗, dz∗′)

(11)

Algorithm: Value Function Iteration

1. Compute eq. (10)

2. Iteratively guess eq.(11)

3. Get a policy function, giving the value-maximizing choice forevery state

4. The policy function is a 323× 2059 matrix giving the best ofk ′, p′ for every z , k , p

5. Use a cc2.8xlarge

Page 25: Barr cc slides

. . . . . .

How to solve

maxK ′,P′∈K×P

e(K ,K ′,P,P ′, z∗) + φ(e(K ,K ′,P ,P ′, z∗)) (10)

+ β

∫V (K ′,P ′, z∗)dΓ(z∗, dz∗′)

(11)

Algorithm: Value Function Iteration

1. Compute eq. (10)

2. Iteratively guess eq.(11)

3. Get a policy function, giving the value-maximizing choice forevery state

4. The policy function is a 323× 2059 matrix giving the best ofk ′, p′ for every z , k , p

5. Use a cc2.8xlarge

Page 26: Barr cc slides

. . . . . .

How to solve

maxK ′,P′∈K×P

e(K ,K ′,P,P ′, z∗) + φ(e(K ,K ′,P ,P ′, z∗)) (10)

+ β

∫V (K ′,P ′, z∗)dΓ(z∗, dz∗′)

(11)

Algorithm: Value Function Iteration

1. Compute eq. (10)

2. Iteratively guess eq.(11)

3. Get a policy function, giving the value-maximizing choice forevery state

4. The policy function is a 323× 2059 matrix giving the best ofk ′, p′ for every z , k , p

5. Use a cc2.8xlarge

Page 27: Barr cc slides

. . . . . .

How to solve

maxK ′,P′∈K×P

e(K ,K ′,P,P ′, z∗) + φ(e(K ,K ′,P ,P ′, z∗)) (10)

+ β

∫V (K ′,P ′, z∗)dΓ(z∗, dz∗′)

(11)

Algorithm: Value Function Iteration

1. Compute eq. (10)

2. Iteratively guess eq.(11)

3. Get a policy function, giving the value-maximizing choice forevery state

4. The policy function is a 323× 2059 matrix giving the best ofk ′, p′ for every z , k , p

5. Use a cc2.8xlarge

Page 28: Barr cc slides

. . . . . .

How to solve

maxK ′,P′∈K×P

e(K ,K ′,P,P ′, z∗) + φ(e(K ,K ′,P ,P ′, z∗)) (10)

+ β

∫V (K ′,P ′, z∗)dΓ(z∗, dz∗′)

(11)

Algorithm: Value Function Iteration

1. Compute eq. (10)

2. Iteratively guess eq.(11)

3. Get a policy function, giving the value-maximizing choice forevery state

4. The policy function is a 323× 2059 matrix giving the best ofk ′, p′ for every z , k , p

5. Use a cc2.8xlarge

Page 29: Barr cc slides

. . . . . .

Software - Old Version

I Original solver written in Python / Numpy

I Pros: beautifully general, modular,

I Cons: takes 15 mins to solve. Global interpreter lock makesthings hard to parallelize

Page 30: Barr cc slides

. . . . . .

Software - Old Version

I Original solver written in Python / Numpy

I Pros: beautifully general, modular,

I Cons: takes 15 mins to solve. Global interpreter lock makesthings hard to parallelize

Page 31: Barr cc slides

. . . . . .

Software - Old Version

I Original solver written in Python / Numpy

I Pros: beautifully general, modular,

I Cons: takes 15 mins to solve. Global interpreter lock makesthings hard to parallelize

Page 32: Barr cc slides

. . . . . .

Software and Hardware - Version 2 - I

I Reimplemented in C++ using Eigen - high performancetemplating engine

I Eigen links against Intel’s Math Kernel Library (optimizedBLAS, LAPACK)

I Intel’s icpc C++ compiler, using -xavx

I cc2.8xlarge have Intel Xeon Sandy Bridge-EP’s, which haveAVX

I OpenMP to use all 32 threads

I Result....

Page 33: Barr cc slides

. . . . . .

Software and Hardware - Version 2 - I

I Reimplemented in C++ using Eigen - high performancetemplating engine

I Eigen links against Intel’s Math Kernel Library (optimizedBLAS, LAPACK)

I Intel’s icpc C++ compiler, using -xavx

I cc2.8xlarge have Intel Xeon Sandy Bridge-EP’s, which haveAVX

I OpenMP to use all 32 threads

I Result....

Page 34: Barr cc slides

. . . . . .

Software and Hardware - Version 2 - I

I Reimplemented in C++ using Eigen - high performancetemplating engine

I Eigen links against Intel’s Math Kernel Library (optimizedBLAS, LAPACK)

I Intel’s icpc C++ compiler, using -xavx

I cc2.8xlarge have Intel Xeon Sandy Bridge-EP’s, which haveAVX

I OpenMP to use all 32 threads

I Result....

Page 35: Barr cc slides

. . . . . .

Software and Hardware - Version 2 - I

I Reimplemented in C++ using Eigen - high performancetemplating engine

I Eigen links against Intel’s Math Kernel Library (optimizedBLAS, LAPACK)

I Intel’s icpc C++ compiler, using -xavx

I cc2.8xlarge have Intel Xeon Sandy Bridge-EP’s, which haveAVX

I OpenMP to use all 32 threads

I Result....

Page 36: Barr cc slides

. . . . . .

Software and Hardware - Version 2 - I

I Reimplemented in C++ using Eigen - high performancetemplating engine

I Eigen links against Intel’s Math Kernel Library (optimizedBLAS, LAPACK)

I Intel’s icpc C++ compiler, using -xavx

I cc2.8xlarge have Intel Xeon Sandy Bridge-EP’s, which haveAVX

I OpenMP to use all 32 threads

I Result....

Page 37: Barr cc slides

. . . . . .

Software and Hardware - Version 2 - I

I Reimplemented in C++ using Eigen - high performancetemplating engine

I Eigen links against Intel’s Math Kernel Library (optimizedBLAS, LAPACK)

I Intel’s icpc C++ compiler, using -xavx

I cc2.8xlarge have Intel Xeon Sandy Bridge-EP’s, which haveAVX

I OpenMP to use all 32 threads

I Result....

Page 38: Barr cc slides

Model Solves in 90 seconds

..

Page 39: Barr cc slides

. . . . . .

Software and Hardware - Version 2 - II

I cc2.8xlarge’s are fast

I coding towards MKL / AVX makes things gives a substantialspeedup

I at this scale, optimizations such as row-major vs columnmajor are trivial. Eigen makes this easy.

typedef Eigen : : Matrix<double ,Eigen : : Dynamic , Eigen : : Dynamic ,Eigen : : RowMajor> MatrixRMXd ;

I I can iterate on a 665057× 2059 about once per second

I OpenMP is easy

Page 40: Barr cc slides

. . . . . .

while ( ( err > iterpar . TOLERANCE )&& ( itercount < iterpar . MAXIT ) ) EV_prev . noalias ( ) = beta ∗ TMAT ∗ V_prev ;#pragma omp parallel for

for ( int i = 0 ; i < Nshocks ; i++) // p a r a l l e l copyfullmat . middleRows ( i∗nstates , nstates ) =staticmat . middleRows (i∗nstates , nstates ) ;// p a r a l l e l b r o adca s tfullmat . middleRows ( i∗nstates , nstates ) . rowwise ( )

+= EV_prev . row (i ) ;// p a r a l l e l new va l u e fnV_new . row (i ) = fullmat . middleRows (i∗nstates , nstates )

. rowwise ( ) . maxCoeff ( ) . transpose ( ) ;// p a r a l l e l ge t minsdiffs (i ) = ( V_new . row (i )

− V_prev . row (i ) ) . array ( ) . abs ( ) . maxCoeff ( ) ;lbounds (i ) = ( V_new . row (i )

− V_prev . row (i ) ) . minCoeff ( ) ;ubounds (i ) = ( V_new . row (i )

− V_prev . row (i ) ) . maxCoeff ( ) ; // end p a r a l l e l f o r

Page 41: Barr cc slides

. . . . . .

lbound = beta ∗ double ( lbounds . minCoeff ( ) ) ;ubound = beta ∗ double ( ubounds . maxCoeff ( ) ) ;

double adjfactoriter = 0.5 ∗ ( ( beta/(1−beta ) )∗ lbound + ( beta/(1−beta ) )∗ ubound ) ;

double diff = diffs . maxCoeff ( ) ;

#pragma omp parallel for

for ( int ii = 0 ; ii < Nshocks ; ii++) V_new . row ( ii ) . array ( ) += adjfactoriter ;

err = diff ;

// UPDATE ITER COUNT AND VALUE FUNCTIONcout << "i: " << itercount++ << ": " << err << endl ;

V_prev = V_new ;

// END WHILE

Page 42: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 43: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 44: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]

2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 45: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 46: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 47: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 48: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary

2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 49: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue

3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 50: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 51: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve

3.2 Simulate and gather statistics3.3 Push all back to S3

Page 52: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics

3.3 Push all back to S3

Page 53: Barr cc slides

. . . . . .

How I Use AWS - Solving the Model A LOT

I GOAL: See how the model behaves under random sets ofparameterizations

I HOWTO: - Small Python (using mostly boto) ScriptFor i in 1:N

1. Generate random parameterization Ωi = [ri , θi , δi , εP,i , ...]2. Assign a UUID to Ωi

3. Push Ωi SQS

I SOLVER AMI

1. Get latest solver binary2. Check SQS queue3. While (queue nonempty)

3.1 Get Ωi and solve3.2 Simulate and gather statistics3.3 Push all back to S3

Page 54: Barr cc slides

Identification!

..

Page 55: Barr cc slides

No Identification

..

Page 56: Barr cc slides

. . . . . .

AWS Advantages

I For each plot, each point takes at least 90 seconds to generate

I Allows me to work in real time - start a group of cc2.8xlarge’s

I Paid for by AWS in Education grant

I cc2.8xlarge’s are FAST!

Page 57: Barr cc slides

. . . . . .

AWS Advantages

I For each plot, each point takes at least 90 seconds to generate

I Allows me to work in real time - start a group of cc2.8xlarge’s

I Paid for by AWS in Education grant

I cc2.8xlarge’s are FAST!

Page 58: Barr cc slides

. . . . . .

AWS Advantages

I For each plot, each point takes at least 90 seconds to generate

I Allows me to work in real time - start a group of cc2.8xlarge’s

I Paid for by AWS in Education grant

I cc2.8xlarge’s are FAST!

Page 59: Barr cc slides

. . . . . .

AWS Advantages

I For each plot, each point takes at least 90 seconds to generate

I Allows me to work in real time - start a group of cc2.8xlarge’s

I Paid for by AWS in Education grant

I cc2.8xlarge’s are FAST!

Page 60: Barr cc slides

. . . . . .

Next Research Step - Simulated Method of Moments

MAIN IDEA:

I Reality has some true parameterization Ω∗ which we don’tknow.

I Reality has some statistics X ∗ which we do know.

I A model’s Ωi implies simulated statistics Xi .

Xi = f (Ωi )

I To find Ω∗, we can define

g(Ωi ) = sum(abs(X ∗ − f (Ωi )))

and then find the Ωi which minimizes g(Ωi ).

I This amounts to a multidimensional optimization, which iswell understood (e.g. Nelder Mead, Simulated Annealing)

Page 61: Barr cc slides

. . . . . .

Next Research Step - Simulated Method of Moments

MAIN IDEA:

I Reality has some true parameterization Ω∗ which we don’tknow.

I Reality has some statistics X ∗ which we do know.

I A model’s Ωi implies simulated statistics Xi .

Xi = f (Ωi )

I To find Ω∗, we can define

g(Ωi ) = sum(abs(X ∗ − f (Ωi )))

and then find the Ωi which minimizes g(Ωi ).

I This amounts to a multidimensional optimization, which iswell understood (e.g. Nelder Mead, Simulated Annealing)

Page 62: Barr cc slides

. . . . . .

Next Research Step - Simulated Method of Moments

MAIN IDEA:

I Reality has some true parameterization Ω∗ which we don’tknow.

I Reality has some statistics X ∗ which we do know.

I A model’s Ωi implies simulated statistics Xi .

Xi = f (Ωi )

I To find Ω∗, we can define

g(Ωi ) = sum(abs(X ∗ − f (Ωi )))

and then find the Ωi which minimizes g(Ωi ).

I This amounts to a multidimensional optimization, which iswell understood (e.g. Nelder Mead, Simulated Annealing)

Page 63: Barr cc slides

. . . . . .

Next Research Step - Simulated Method of Moments

MAIN IDEA:

I Reality has some true parameterization Ω∗ which we don’tknow.

I Reality has some statistics X ∗ which we do know.

I A model’s Ωi implies simulated statistics Xi .

Xi = f (Ωi )

I To find Ω∗, we can define

g(Ωi ) = sum(abs(X ∗ − f (Ωi )))

and then find the Ωi which minimizes g(Ωi ).

I This amounts to a multidimensional optimization, which iswell understood (e.g. Nelder Mead, Simulated Annealing)

Page 64: Barr cc slides

. . . . . .

Next Research Step - Simulated Method of Moments

MAIN IDEA:

I Reality has some true parameterization Ω∗ which we don’tknow.

I Reality has some statistics X ∗ which we do know.

I A model’s Ωi implies simulated statistics Xi .

Xi = f (Ωi )

I To find Ω∗, we can define

g(Ωi ) = sum(abs(X ∗ − f (Ωi )))

and then find the Ωi which minimizes g(Ωi ).

I This amounts to a multidimensional optimization, which iswell understood (e.g. Nelder Mead, Simulated Annealing)

Page 65: Barr cc slides

. . . . . .

Next Research Step - Simulated Method of Moments

I Pick a large amount of starting values of the optimizers

I Each cc2.8xlarge can handle 2 optimizers simultaneously

I Should take about 500 iterations to find a solution

Page 66: Barr cc slides

. . . . . .

Next Research Step - Simulated Method of Moments

I Pick a large amount of starting values of the optimizers

I Each cc2.8xlarge can handle 2 optimizers simultaneously

I Should take about 500 iterations to find a solution

Page 67: Barr cc slides

. . . . . .

Next Research Step - Simulated Method of Moments

I Pick a large amount of starting values of the optimizers

I Each cc2.8xlarge can handle 2 optimizers simultaneously

I Should take about 500 iterations to find a solution

Page 68: Barr cc slides

. . . . . .

Thank you

References:

I My blog: www.econsteve.com

I My code: www.bitbucket.com/stevejb

I Twitter: @stevejb

I AWS in Eduaction: http://aws.amazon.com/education/

Page 69: Barr cc slides

. . . . . .

Thank you

References:

I My blog: www.econsteve.com

I My code: www.bitbucket.com/stevejb

I Twitter: @stevejb

I AWS in Eduaction: http://aws.amazon.com/education/

Page 70: Barr cc slides

. . . . . .

Thank you

References:

I My blog: www.econsteve.com

I My code: www.bitbucket.com/stevejb

I Twitter: @stevejb

I AWS in Eduaction: http://aws.amazon.com/education/

Page 71: Barr cc slides

. . . . . .

Thank you

References:

I My blog: www.econsteve.com

I My code: www.bitbucket.com/stevejb

I Twitter: @stevejb

I AWS in Eduaction: http://aws.amazon.com/education/