Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. def f(z):
  2. return ((1-z)*np.exp(-d/z))/(((1-z)**(1+d))*(z**(1-d)))
  3. lhs=integrate.quad(f,0,0.5)
  4. def rhs(p):
  5. return integrate.quad(-f,0.5, p)
  6. p_star= fsolve(rhs-lhs,0.75) # will depend on time series only indrectly when d will be optimized
  7. for i in np.arange(N):
  8. z=Z[i,:]
  9. main = np.exp (kz+m*np.arange(w))
  10. cumsum_t=np.cumsum(1/main)
  11. final_sum= main*cumsum_t
  12. t_solution= # index i where final_sum[i]> p_star/(1-p_star)) # not implemented yet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement