4/25/2014 nattawoot koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 financial...

32
4/25/2014 Nattawoot Koowattanatianchai 1

Upload: phungtuyen

Post on 23-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

4/25/2014 Nattawoot Koowattanatianchai 1

Page 2: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

4/25/2014 Nattawoot Koowattanatianchai 2

Lecture 8

การจ าลองแบบมอนตคาโลและเทคนคการลดความ

แปรปรวน

(Monte Carlo Simulation and Variance

Reduction Techniques)

Page 3: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

หวขอการบรรยาย

การจ าลองแบบมอนตคาโล

เทคนคการลดความแปรปรวนดวย

วธ antithetic variates

เทคนคการลดความแปรปรวนดวย

วธ moment matching

4/25/2014 Nattawoot Koowattanatianchai 3

Page 4: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

เอกสารประกอบการสอน

Ross, S. (1976), The Arbitrage

Theory of Option Pricing, Journal

of Economic Theory, Vol 13 no.

3, pp. 341-360.

4/25/2014 Nattawoot Koowattanatianchai 4

Page 5: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

การจ าลองแบบมอนตคาโล (Monte

Carlo Simulation) นยาม

กระบวนการทประกอบดวย (1) การสราง

ตวเลขแบบสมมาจากการแจกแจงความ

นาจะเปนทเปนตวบงชแหลงความไม

แนนอน (เชน ยอดขายผลตภณฑใหม

ราคาหน อตราดอกเบย อตราแลกเปลยน

เงนตราตางประเทศ ราคาสนคาโภค

ภณฑ) (2) การใชตวเลขทจ าลองไดมา

วเคราะหถงผลลพธและความเสยงท

นาจะเกดขนของสงทสนใจ

4/25/2014 Nattawoot Koowattanatianchai 5

Page 6: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

การจ าลองแบบมอนตคาโล (Monte

Carlo Simulation) การใชงาน

ใชวเคราะหความไมแนนอนในการด าเนนธรกจ หรอ

ผลลพธทเปนไดของสงทยงไมเกดขน เชน กอนทจะม

การประกาศใชเงนยโร นกวจยใชการจ าลองแบบมอนต

คาโลในการศกษาผลกระทบตอคณสมบตตางๆ ของกลม

หลกทรพยทประกอบดวยหลกทรพยของหลายประเทศ

ในยโรป ซงมการคาดการณวาหลงจากมการใชเงนสกล

ยโร สหสมพนธของระหวางตลาดในยโรปจะเพมขน

4/25/2014 Nattawoot Koowattanatianchai 6

Page 7: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

การจ าลองแบบมอนตคาโล (Monte

Carlo Simulation) การใชงาน

ใชประเมนราคาตราสารสทธ ทไมมสตรตายตวในการหา

คา เชน ราคาของ Asian options

ใชยนยนผลทางทฤษฎวาเปนจรงหรอไม เชน ตรวจสอบ

การแจกแจงของราคาหน GBM

ใชตรวจสอบการแจกแจงความนาจะเปนของตวแปรท

เราสนใจ ทไมมทฤษฎรองรบ

4/25/2014 Nattawoot Koowattanatianchai 7

Page 8: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

standard simulation

สมมตวาเรารรปแบบของตวแปรสม แตเราไมรคณ

สมบตของตวแปรสมตวน เราจงจะจ าลองตวแปรน

มา n คา แลวหลงจากนนจงท าการศกษาคณสมบต

ตวอยาง: เราตองการประมาณราคา call แบบ

ยโรเปยน โดยทหนอางองเคลอนทตาม GBM

4/25/2014 Nattawoot Koowattanatianchai 8

0,max)( KSeC T

tTr

t

tTZtTrSS tT )(exp 2

21

Page 9: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

standard simulation

สงเกตไดวา μ ใน GBM จะถกแทนทดวยอตรา

ดอกเบยทปราศจากความเสยง r ตามทฤษฎ risk-

neutral pricing

การประเมนราคา call ท าไดดวยการสมเลอก

ตวเลขจาก N(0,1) เพอทจะจ าลอง ST แรกตามน

4/25/2014 Nattawoot Koowattanatianchai 9

tTZtTrSS tT )1(2

21)1( )(expˆ

Page 10: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

standard simulation

ราคา call (จ าลอง) ราคาแรกสามารถค านวณไดตามน

ท าซ าขนตอนขางบน n ครง ราคาประเมนของ call ตว

นจะค านวณไดตามน

ซง C^t จะมคาคาดหมาย = Ct และความแปรปรวนท

แปรผกผนกบ n

4/25/2014 Nattawoot Koowattanatianchai 10

0,max )1()()1( KSeC T

tTr

t

n

i

i

tt Cn

C1

)(1ˆ

Page 11: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

standard simulation

ถา X1, X2, …, Xn เปน iid ทมคาเฉลย μ = E(Xi)

และความแปรปรวน σ2 = var(Xi) <

แปลวาถาเราเพมจ านวนคาสงเกตในกลมตวอยาง

คาเฉลยของกลมตวอยางจะมความแปรปรวนลดลงเรอยๆ

(CLT)

4/25/2014 Nattawoot Koowattanatianchai 11

n

i

inXX

nXX

1

1

2

var

Page 12: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

standard simulation

จ าลอง 1000 คาของ ST จากขอมลดงน

S0 = 100

r = .06

σ = .3

T = 1 ป

∆t = 1/250 ป = 1 วน

lnST จะมการแจกแจงแบบปกต

คาเฉลย = lnS0 + (r – .5 ×σ2)T

ความแปรปรวน = σ2T

4/25/2014 Nattawoot Koowattanatianchai 12

Page 13: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

4/25/2014 Nattawoot Koowattanatianchai 13

histogram of 1000 simulated log-ST from GBM

share price

rela

tive

frequ

ency

4.0 4.5 5.0 5.5

0.0

1.0

histogram of 1000 simulated ST from GBM

share price

rela

tive

frequ

ency

50 100 150 200 250

0.00

00.

010

0.02

0

Page 14: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

standard simulation

ก าหนดให K = 5, i = 1, 2, …, 1000

C^t = exp(-.06×1) × คาเฉลยของ max(S(i)

T – K,0) =

95.02587

ราคา call ตวน (ทม S0 = 100, r = .06, σ = .3, T = 1

ป) ตามสตร Black-Scholes = 95.29118 (ขนาดความ

ผดพลาดของ C^t = 0.26538)

C^t = 95.1781 ถาท าซ า 10,000 ครง (ขนาดความ

ผดพลาด = 0.1130773)

C^t = 95.30597 ถาท าซ า 100,000 ครง (ขนาด

ความผดพลาด = 0.01479267)

4/25/2014 Nattawoot Koowattanatianchai 14

Page 15: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

standard simulation

เนองจาก C^t เปนคาเฉลยของกลมตวอยาง คา

เบยงเบนมาตรฐานของ C^t หรอคาคลาดเคลอน

มาตรฐานของ Monte Carlo Simulation = σ/√n

σ = คาเบยงเบนมาตรฐานของ C(i)t

n = จ านวนการท าซ าในการจ าลองแตละครง

ถาตองการลดคาคลาดเคลอนมาตรฐานลงสองเทา n

ใหมตองเพมเปนสเทาของ n เดม

4/25/2014 Nattawoot Koowattanatianchai 15

12

1

2

2

2

4

2

1

nn

nn

Page 16: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

Antithetic variates

Moment matching

methods

4/25/2014 Nattawoot Koowattanatianchai 16

variance reduction techniques

Page 17: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

antithetic variates

แนวคดของวธ AV นคลายกบหลกการของการ

กระจายความเสยงในกลมหลกทรพย (สรางกลม

หลกทรพยทประกอบดวยหลกทรพยทไมม

สหสมพนธแบบสมบรณระหวางกน) ซงหลกทรพยท

มประโยชนในการกระจายความเสยง ไดแก

หลกทรพยทมสหสมพนธแบบลบกบตลาด

เนองจาก Z มสหสมพนธลบแบบสมบรณกบ –Z

และทงสองตวแปรมการแจกแจงแบบปกตมาตรฐาน

ดงนนราคา S(i)T ทไดจาก Z และ S(i)

T ทไดจาก –Z

กจะมการแจกแจงทถกตองเชนเดยวกน

4/25/2014 Nattawoot Koowattanatianchai 17

Page 18: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

antithetic variates

S(i)T ทไดจาก Z

S(i)T ทไดจาก –Z

4/25/2014 Nattawoot Koowattanatianchai 18

tTZtTrSS i

t

i

T )(2

21)( )(exp

tTZtTrSS i

t

i

T )()(exp~ )(2

21)(

0,max )()()( KSeC i

T

tTri

t

0,~

max~ )()()( KSeC i

T

tTri

t

Page 19: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

antithetic variates

ถาเราน า Z ทสมเลอกมา n ตว และ –Z (n ตว) มา

เรยงจดการแจกแจง การแจกแจงดงกลาวจะเปน

ระเบยบมากกวา การแจกแจงของ Z ทสมมา 2n ตว

คาเฉลยของ {Z,-Z} = 0 เสมอ ในขณะทคาเฉลยของ Z

จะไมมทาง = 0 ไมวาจะสมเลอกมากตวกตาม

เชนเดยวกน การแจกแจงของ {S(i)T ทไดจาก Z, S(i)

T ท

ไดจาก –Z} จะเปนระเบยบมากกวาการแจกแจงของ S(i)T

ทไดจาก Z เพยงอยางเดยว

4/25/2014 Nattawoot Koowattanatianchai 19

Page 20: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

antithetic variates

ราคา call ทประเมนไดดวยวธ AV ไดแก

4/25/2014 Nattawoot Koowattanatianchai 20

n

i

i

t

i

tt

CC

nC

1

)()(

2

~1ˆ

Page 21: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

4/25/2014 Nattawoot Koowattanatianchai 21

histogram of 1000 simulated log-ST-tilda from GBM

share price

rela

tive

frequ

ency

4.0 4.5 5.0 5.5

0.0

1.0

histogram of 1000 simulated ST-tilda from GBM

share price

rela

tive

frequ

ency

50 100 150 200

0.00

00.

010

Page 22: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

Antithetic variates

ราคาของ call จากวธ AV (n =1000) = 95.24201

(ขนาดความผดพลาด = 0.04916733 ซงนอยกวา

กรณ standard simulation ทม n = 1000)

4/25/2014 Nattawoot Koowattanatianchai 22

Page 23: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

moment matching

แนวคดของวธ MM ไดแก การท าให Z หรอ S(i)T ท

จ าลองขนมโมเมนตของกลมตวอยางเทากบ

โมเมนตตามทฤษฎ

MM1: จบคโมเมนตแรกของ Z

คาเฉลยของกลมตวอยาง Z มกไมเทากบ 0 แตคาเฉลย

ของกลมตวอยาง Ž จะเทากบ 0

4/25/2014 Nattawoot Koowattanatianchai 23

n

i

iii Zn

ZZZZ1

)()()( 1~

Page 24: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

moment matching

การประเมนราคา call ตาม MM1

4/25/2014 Nattawoot Koowattanatianchai 24

tTZtTrSS i

t

i

T )(2

21)( ~

)(exp~

0,~

max~ )()()( KSeC i

T

tTri

t

Page 25: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

moment matching

MM2: จบคสองโมเมนตแรกของ Z

μZ = 0

σZ = 1

sZ = คาเบยงเบนมาตรฐานของกลมตวอยาง Z

คาเฉลยและความแปรปรวนของกลมตวอยาง Ž จะ

เทากบ 0 และ 1 ตามล าดบ ในขณะทคาเฉลยและความ

แปรปรวนของกลมตวอยาง Z จะไมเทากบตวเลขทาง

ทฤษฎ

4/25/2014 Nattawoot Koowattanatianchai 25

Z

Z

Zii

sZZZ

)()(~

Page 26: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

moment matching

ลองสราง Z มา 1000 คา แลวแปลง Z ตาม MM1

และ MM2 ไดผลดงน

4/25/2014 Nattawoot Koowattanatianchai 26

Sample mean Sample standard

deviation

Z -0.01613096 1.012485

Ž (MM1) 4.634144×10-18 1.012485

Ž (MM2) 5.727928×10-18 1

Page 27: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

moment matching

MM3: จบคโมเมนตแรกของ S(i)T

คาเฉลยของกลมตวอยางหลงจากทแปลง S(i)T ตาม

MM3 จะเทากบตวเลขทางทฤษฎ

4/25/2014 Nattawoot Koowattanatianchai 27

)exp(~

0

)()(rTSSSS

TT SST

i

T

i

T

Page 28: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

moment matching

MM3: จบคสองโมเมนตแรกของ S(i)T

σ คอ สมประสทธของความผนผวนจาก GBM

คาเฉลยและความแปรปรวนของกลมตวอยางหลงจากท

แปลง S(i)T ตาม MM3 จะเทากบตวเลขทางทฤษฎ

4/25/2014 Nattawoot Koowattanatianchai 28

1)exp(

~

22

00

)()(

TrT

SS

S

S

S

T

i

T

i

T

eeSrTS

sSSS

TT

T

T

T

Page 29: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

moment matching

Boyle, P., Broadie, E. and Glasserman, P.

(1997). Monte Carlo methods for security

pricing. Journal of Economic Dynamics and Control, 21, 1267-1321

ใช n = 1000 ครงในการประเมนราคา call ดวยวธ

standard simulation และวธ MM

ท าซ าแบบเดม 10000 ครง แลวใชคาเบยงเบนมาตรฐาน

ของตวประมาณคา 10000 ตว เปนตวแทนคา

คลาดเคลอนมาตรฐานของตวประมาณคาทไดจาก

standard simulation และ MM

4/25/2014 Nattawoot Koowattanatianchai 29

Page 30: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

moment matching

σ S0/K Standard

simulation

MM1 MM2 MM3 MM4

0.2 0.9 0.24 0.19 0.11 0.19 0.09

1.0 0.62 0.29 0.09 0.26 0.10

1.1 0.93 0.19 0.09 0.15 0.11

0.4 0.9 0.80 0.55 0.24 0.51 0.17

1.0 1.22 0.66 0.19 0.56 0.23

1.1 1.61 0.63 0.17 0.48 0.28

0.6 0.9 1.40 0.95 0.38 0.84 0.28

1.0 1.93 1.1 0.31 0.91 0.39

1.1 2.38 1.13 0.25 0.85 0.49

4/25/2014 Nattawoot Koowattanatianchai 30

Page 31: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

4/25/2014 Nattawoot Koowattanatianchai 314/25/2014 Nattawoot Koowattanatianchai 31

4/6/2011 Natt Koowattanatianchai 31

Page 32: 4/25/2014 Nattawoot Koowattanatianchai 1 - web kufin.bus.ku.ac.th/01135532 Financial Innovation/Lecture...ใช ตรวจสอบการแจกแจงความน าจะเป

4/25/2014 Nattawoot Koowattanatianchai 32

Email:

[email protected]

Homepage:

http://fin.bus.ku.ac.th/nattawoot.htm

Phone:

02-9428777 Ext. 1221

Mobile:

087- 5393525

Office:

ชน 9 ตกใหมคณะบรหารธรกจ