You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sigma*2 is given by preset in demo code to generate brownian process, and it can be calculate by std of brownian path.
As I do such experiment, I found interesting thing
importnumpyasnpimportbrownianasbmdelta=2# The Wiener process parameter.T=10.0# Total time.N=500# Number of steps.dt=T/N# Time step sizem=100# Number of realizations to generate.x=np.empty((m, N+1)) # Create an empty array to store the realizations.x[:, 0] =1000# Initial values of x.bm.brownian(x[:, 0], N, dt, delta, out=x[:, 1:])
# %% check std and vol risk pricestd=np.diff(x, axis=1).std(axis=1) /np.sqrt(dt)
# all sequence std close to deltanp.testing.assert_allclose(delta, std, rtol=0.1)
# so vol risk is gamma * sigma ** 2 = 4 * gamma, risk value / S0 is 4 * gamma / 1000 = 0.004 gamma# %% round x to min float price 0.1, std value and risk value is not changex_round=np.round(x, 1)
std_round=np.diff(x_round, axis=1).std(axis=1) /np.sqrt(dt)
np.testing.assert_allclose(delta, std_round, rtol=0.1)
# %% If price Unit changed, like previous unit is dollar/gram, to dollar/10gram, aka new price is 10 * xx_10=10*x_roundstd_10=np.diff(x_10, axis=1).std(axis=1) /np.sqrt(dt)
# std also times 10 timesnp.testing.assert_allclose(delta*10, std_10, rtol=0.1)
# so vol risk is gamma * sigma ** 2 = 400 * gamma, risk value / S0 is 400 * gamma / 10000 = 0.04 gamma
So, why vol risk changed when we just change price unit?
The text was updated successfully, but these errors were encountered:
In Reserve Price Equation and Reserve Spread Equation, sigma ** 2 is used to measure market volatility risk, like
sigma*2 is given by preset in demo code to generate brownian process, and it can be calculate by std of brownian path.
As I do such experiment, I found interesting thing
So, why vol risk changed when we just change price unit?
The text was updated successfully, but these errors were encountered: