คำนวณราคาออปชันด้วย Black-Scholes
ฟังก์ชัน Black_Scholes() ในแพ็กเกจ qrmtools ใช้สำหรับกำหนดราคา European call และ put option โดยอิงสูตร Black-Scholes มาตรฐานสำหรับหุ้นที่ไม่จ่ายเงินปันผล
ในแบบฝึกหัดนี้ จะทำการกำหนดราคาตามลำดับดังนี้: European call แบบ out-of-the-money, European call แบบ in-the-money, European put แบบ in-the-money และ European put แบบ out-of-the-money ออปชันจะเป็น in-the-money เมื่อการใช้สิทธิ์ทันทีให้ผลตอบแทนเป็นบวก และเป็น out-of-the-money เมื่อไม่เป็นเช่นนั้น
จุดสำคัญของแบบฝึกหัดนี้คือการทำความเข้าใจปัจจัยความเสี่ยงต่าง ๆ ที่ส่งผลต่อการคำนวณราคา ได้แก่ ราคาหุ้นปัจจุบัน ความผันผวนปัจจุบัน และอัตราดอกเบี้ยปัจจุบัน
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Quantitative Risk Management in R
คำแนะนำการฝึกหัด
- กำหนดอัตราดอกเบี้ยปัจจุบัน
rเป็น 0.01, ความผันผวนปัจจุบันsigmaเป็น 0.2 และราคาใช้สิทธิ์Kเป็น 100 - ตรวจสอบอาร์กิวเมนต์ของฟังก์ชัน
Black_Scholes() - กำหนดราคา European call option ที่ครบกำหนดใน
T = 1ปี เมื่อราคาหุ้นปัจจุบันคือS = 80 - กำหนดราคา European call option ที่ครบกำหนดใน
T = 1ปี เมื่อราคาหุ้นปัจจุบันคือS = 120 - กำหนดราคา European put option ที่ครบกำหนดใน
T = 1ปี เมื่อราคาหุ้นปัจจุบันคือS = 80 - กำหนดราคา European put option ที่ครบกำหนดใน
T = 1ปี เมื่อราคาหุ้นปัจจุบันคือS = 120
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Set the interest rate r to be 0.01, the volatility sigma to be 0.2 and the strike K to be 100
r <- 0.01
# Look at the arguments of the Black_Scholes function
args(___)
# Price a European call option that matures in one year if the current stock price is 80
Black_Scholes(0, ___, r, sigma, K, 1, "call")
# Price a European call option that matures in one year if the current stock price is 120
# Price a European put option that matures in one year if the current stock price is 80
Black_Scholes(___, ___, r, sigma, K, ___,"put")
# Price a European put option that matures in one year if the current stock price is 120