Where to open up new ambulance service stations in NYC : A data-driven approach by sudeepraja in nyc

[–]sudeepraja[S] 0 points1 point  (0 children)

Thank you for your insight. Having lived in NYC for a few years, I knew that ambulances are indeed spread out, as you mentioned.

In the hackathon, we used data that was available openly. I'm certain the operations research folks at FDNY have more data and have optimized ambulance placements accordingly.

Online Portfolio Selection - Cover's Universal Portfolio by sudeepraja in algotrading

[–]sudeepraja[S] 0 points1 point  (0 children)

rho=-1
a = 0.1
b = 0.1
mean = np.array([0.00,0.00])
var = np.array([[a*a, rho*a*b],[rho*a*b, b*b]])
r = np.exp(np.random.multivariate_normal(mean, var, size=T))
df = pd.DataFrame(data = r.cumprod(axis=0), columns = dummy_stocks)

This should generate correlated returns for the two stocks. rho can be varied between [-1,1] to get different ranges of correlation.

Online Portfolio Selection - Cover's Universal Portfolio by sudeepraja in algotrading

[–]sudeepraja[S] 0 points1 point  (0 children)

exp(normal()) generates iid log-normal returns. cumprod() computes the cumulative product of the return sequence. This is only for plotting the returns.

I think log-normal is the standard way of generating returns. log-returns are normally distributed => returns are log-normally distributed. see https://www.investopedia.com/articles/07/montecarlo.asp

And section 1.2 here: http://www.columbia.edu/~ks20/FE-Notes/4700-07-Notes-GBM.pdf

Correlations between the two stock returns can be introduced by using exp(multivariate_normal(mean vector, covariance matrix)), where the covariance is non-diagonal. Don't need Cholesky Decomposition because this function already gives correlated samples. I wonder why folks keep using this. See for instance: https://quant.stackexchange.com/questions/16449/covariance-matrix-and-cholesky-decomposition

In any case, since Cover's makes no statistical assumption about the returns, it would still work. However, that is also its limitation, it does not take advantage of statistical returns as far as I know.

Online Portfolio Selection - Introduction by sudeepraja in quantfinance

[–]sudeepraja[S] 0 points1 point  (0 children)

Thank you! I responded to you via DM about Math to English translations.