Skip to Main Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate content levelBeginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
582
|
第十四章
編譯完成後,僅需 18.5 毫秒便可對 10 個不同履約價格進行定價。[Page-584]
討論說明
americanPutCompiled
函數回傳 2 個緊實陣列(packed array),第一個為股價格點,第
二個則是各股價所對應的美式選擇權價格,使用 Mathematica 提供的
Interpolation
令建立內插函數便可取得非格點的中間股價之選擇權價格。
藉由檢查
americanPutCompiled
的第 4 個元素,可得知此函數是經過充分編譯的,因為
4 個元素內含的所有元素均是數值型態。
本例所用的美式選擇權定價演算法屬於自由邊界值問題(free boundary value problem
的線性互補形式(linear complementarity),參數
a
nn
T0
mm
(及其對應的
s
h
用來設定格點的分布,
a
nn
決定空間(即股價)格點,
T0
mm
則決定時間格點。對
顯式數值問題而言,兩方向的格點分布須滿足特定條件,否則數值運算將無法收斂至正
確解,完全顯式的數值方法須滿足
alpha=s/h^2<=1/2
不等式,這意味著如果空間的步長
減為十分之一,則時間步長便須減為百分之一,這並非精確度問題,而是穩定性問題。
舉例而言,如果
mm
值降低為 15,則
alpha
不等式便無法成立,數值解的不穩定性便十
分明顯,若降低至 10 甚至是 5,求解過程更是一場災難。傳統的美式選擇權計算定價時
使用的是二項樹法(binominal tree),但卻存
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull

Publisher Resources

ISBN: 9789863470106