Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Simulating Bitcoin Call Option Prices using Black Scholes Model

Hello all!

This one was a lot of fun for me as I've been wanting to work with option prices for a while now. It takes in Bitcoin prices and the risk-free rate (which you can alter yourself just change the column name) and simulates what an at-the-money call option price should be using the Black Scholes model. Some quick rules about option prices:

  • The longer the time horizon the higher the option price
  • The higher the volatility the higher the option price
  • The higher the spread between the strike and stock price the higher the call option price and vice versa for put options

There is some ambiguity over which time horizon and volatility to use but I've chosen to use a 30 day standard deviation (annualized) for the volatility, a 30 day time horizon, and a 12 month risk-free rate but it's really up to your discretion.

Suggestions for improvement always welcomed as well as any questions about the algo in general.

The next step would be to include a put-call ratio in this, but let's see if someone else wants to give that a stab!

-Seong

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

4 responses

Added the price of a put option using the put-call parity.

Nice!

Good sanity check that the call is higher than the put

-Seong

@Seong..

There was a runtime error.
IndexError: list index out of range
USER ALGORITHM:62, in handle_data

Takes inputs = stock price, strike price, risk free rate, time period/252, pls help thanks...

Why your black sc formula has ".5*math.sqrt(self.std_dev))" in d1? should be square of std, right?