Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.

learn more… | top users | synonyms

0
votes
1answer
104 views

estimate implied volatility using newton-raphson in python

I am trying to calculate the implied volatility using newton-raphson in python, but the value diverges instead of converge. What is wrong with the code? ...
0
votes
1answer
90 views

Calculating Bollinger Band Correctly

My bollinger band comes out like the below, which doesn't seem right. Any idea what is wrong with my code for calculating upper and lower bollinber bands? I obtained my data from here ...
4
votes
0answers
252 views

Rate Distortion Minimization in a Python Clustering Algorithm

I'm attempting to solve for $\hat{k}$ clusters, such that the rate distortion is minimized, as described here, however, the answers that I am getting from my algorithm are not following the "Jump" ...
1
vote
0answers
260 views

Black Scholes well coded Python

I have some trouble with the following code. Some jump and a decentered path are present but it's not the case, normally for Black Scholes diffusion ! Is anyone see a problem in my code ? ...
1
vote
0answers
477 views

Historical volatility from close prices (Haug pg 166)

I have implemented a function for calculating historical volatility using close the close method as described by Haug on page 166. When I implemented the formula given by Haug, it resulted in some ...