Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a REST API to calculate the price and Greeks of a European option on an underlying stock using the Black-Scholed Model. Required Files :

Create a REST API to calculate the price and Greeks of a European option on an underlying stock using the Black-Scholed Model.

Required Files :

api.py: The endpoint routes bs.py: Black-Scholes implementation (can be copied from previous HW) including additional Greeks calculations

The endpoint should be structured in the following way : GET /hw5/black-scholes/(str: ticker) Given a provided ticker, computes the Black-Scholes option price and greeks.

image text in transcribedimage text in transcribed - iscall (bool) - True if call otherwise put - strike (float) - The strike price of the option - rate (float) - The continuous risk-free rate - div (float) - The continuous dividend yield - vol (float) - The volatility parameter to use - expiry (float) - The time to expiry - date (string) - (optional) The as of date of the pricing calculation, if not provided use the latest closing price. Status Codes: - 200 OK-ok - 404 Not Found - ticker not found

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions