Draw a Binomial Pricing Trees in Python

En cours Publié le il y a 5 ans Paiement à la livraison
En cours Paiement à la livraison

I'm going to build a single-page binary tree dashboard in Python and flask/django on calculated stock option's price, where it is similiar with the following project in R but I have two more requests, one is to run as a API using Flask/Django and secondly to use the the existing calculation model in python pacakge "qfrm" .

[login to view URL]

Preferably to embed the python package of "qprm" in the project, instead of my original scripting as below. But for the first step you can use this simpler code in Python 2.7 to protype your ideas.

from math import exp

# option input parameters

dt = input("Timesteps: ")

S = input("Initial spot price: ")

r = input("Risk-free discount rate: ")

K = input("Strike price: ")

p = input("Growth probability: ")

u = input("Growth factor: ")

N = input("Timesteps to expiration: ")

# Choose a Call or a Put

call = raw_input("Call or put? (C/P) ").upper().startswith("C")

def binary(k, us):

Stockprice = S * (u ** (2 * us - k))

if call:

profit = max(0, Stockprice - K)

else:

profit = max(0, K - Stockprice)

# If a leaf node

if k == N:

return profit

# Binomial value recursively

decay = exp(-r * dt)

expected = p * binary(k + 1, us + 1) + (1 - p) * binary(k + 1, us)

binomial = decay * expected

# If an American option

return max(binomial, profit)

print 'Got your option price: $%.3f' % binary(0, 0)

Django Analyses financières Flask Mathématiques Python

Nº du projet : #17482244

À propos du projet

10 propositions Projet à distance Actif il y a 5 ans

10 freelances font une offre moyenne de 178 $ pour ce travail

rajdeepa555

Hello Sir, I am professional python programmer, I mainly deal in web apps in flask/django. I checked your Binomial Pricing Tree algorithm in R. and its convertable in python using Pandas library. this library is a p Plus

$183 USD en 3 jours
(75 Commentaires)
7.0
schoudhary1553

Hello, I can help with you in your project Draw a Binomial Pricing Trees in Python I have more than 5 years of experience in Django, Financial Analysis, Flask, Mathematics, Python . We have worked on several sim Plus

$250 USD en 3 jours
(75 Commentaires)
6.7
ThanassisKalv

hello! I am familiar with binomial math and this kind of project seems pretty cool, I suppose you want your inputs to be in GUI forms and Flask will deliver a frontend with single-page binary dashboard. We can discus Plus

$220 USD en 5 jours
(108 Commentaires)
6.4
snippetbucket

My Respected, Very good experienced with REST API with Django framework. Had done Django insurance, digital-sign-age, school solution, automation, order management kind of success projects. I had experienced w Plus

$200 USD en 4 jours
(49 Commentaires)
5.7
lightingdavid

Hello. I have good skills in Python. I have read your project description carefully and very interest. Contact me please. Thanks......................................

$155 USD en 3 jours
(26 Commentaires)
5.1
omermaroof18

I am CFA and FRM qualified with five years of experience in investment management . Therefore, I can make the binomial tree for you in python. For more details, contact me

$100 USD en 3 jours
(1 Évaluation)
1.7
suunn

Hi i am experience with python 2.7 and django and have confident to handle task with my previous knowladge

$155 USD en 3 jours
(0 Commentaires)
0.0
gd015828

I am python expert I am python expert I am python expert I am python expert I am python expert I am python expert I am python expert I am python expert I am python expert I am python expert I am pyt Plus

$77 USD en 3 jours
(0 Commentaires)
0.0