tag:blogger.com,1999:blog-35364652.post8230965571724080508..comments2017-05-28T14:13:24.363-04:00Comments on Quantitative Trading: Paradox Resolved: Why Risk Decreases Expected Log Return But Not Expected WealthErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-35364652.post-31403392923937032362017-05-09T21:43:29.506-04:002017-05-09T21:43:29.506-04:00I see. Thanks Ernie.I see. Thanks Ernie.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-58894221319803493322017-05-09T19:46:55.975-04:002017-05-09T19:46:55.975-04:00Hi James,
Ah ok - you are taking liquidity with IO...Hi James,<br />Ah ok - you are taking liquidity with IOC, so you are right to be concerned about last look. We only run market-making strategies on FX, using LMT orders, so we don't have issue with last look nor do we measure fill rate. In fact, I don't even know if IB allows their FX market makers to employ last look!<br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-47848195701083756402017-05-09T16:15:06.460-04:002017-05-09T16:15:06.460-04:00I would define fill rate as #filled orders divided...I would define fill rate as #filled orders divided by #execution attempts. For example, if I see EURUSD as 1.0871-1.0872 and I attempt to hit the bid using an IOC order, I may or may not get filled. The bid may change or I could be "last look" rejected. Presumably I won't see the latter with IB so more concerned about the rejections due to latency.<br /><br />Curious as to what fill rate you're seeing.<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-3721740826803254492017-05-09T15:33:55.642-04:002017-05-09T15:33:55.642-04:00Hi James,
Yes, we do run a fund and managed accoun...Hi James,<br />Yes, we do run a fund and managed accounts (qtscm.com) that trades FX. For retail clients, we trade mainly at Interactive Brokers, where we find the bid-ask spread is excellent.<br /><br />For colocation, I recommend https://www.speedytradingservers.com/.<br /><br />May I ask how you define "fill rate"?<br /><br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-88491789008250600272017-05-09T15:26:43.240-04:002017-05-09T15:26:43.240-04:00Hi Ernie,
I'm an avid reader of your blog and...Hi Ernie,<br /><br />I'm an avid reader of your blog and recall you managed a forex fund.<br /><br />I was wondering if you could shed a little light on what infrastructure you use for your forex trading. I think I read that you use Interactive Brokers. Is this correct, and if so, are you co-located and what are the fill rates like?<br /><br />Thanks!<br /><br />James<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-35364652.post-5509018053223329202017-05-06T09:15:55.327-04:002017-05-06T09:15:55.327-04:00Hi Ramesh,
I don't agree with your assertion t...Hi Ramesh,<br />I don't agree with your assertion that one cannot define an ensemble average for a non-stationary series. Students of probability have computed the variance of a random walk for centuries, and it is equal to D*t, where D=diffusion coefficient. A "normal" random walk isn't stationary just as a geometric random isn't, but the ensemble average of the absolute squared deviation is well-defined, given above.<br /><br />But I do agree that expectations of linear and exponential returns differ, and wealth is an expectation of the exponential of the sum of log returns. The mean (or sum of) "arithmetic" returns isn't useful unless we rebalance the portfolio at the end of every period. If we do rebalance, then the wealth becomes an ergodic quantity and ensemble average will equal time average.<br /><br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-65251823116504807342017-05-06T08:40:17.846-04:002017-05-06T08:40:17.846-04:00Ernie, wealth is a non-stationary series (even in...Ernie, wealth is a non-stationary series (even in the wide-sense), so I don't think there is a meaningful way to define an ensemble average. As you show, for fixed t, mu_t= E[S(t)] = mu*t; this makes sense to me as the expected value of the terminal wealth with expectation taken over investors. Specifically, if you consider the two dimensional S(i, t), where i ranges over stocks/investors and t over time, then A_i(t) = average of S(1,t), ..,S_(n, t) is a random variable sequence that converges in probability to mu_t.<br /><br />I think the absence of s in the expression for expectation of S(t) merely reflects the difference between expectations of linear and exponential returns.<br />S. Rameshhttp://www.blogger.com/profile/03712058868816710098noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-42723184850041307792017-05-05T19:15:21.835-04:002017-05-05T19:15:21.835-04:00Thanks for the discussion, Emlyn!
Will take a loo...Thanks for the discussion, Emlyn!<br /><br />Will take a look at Meucci's book when I have a chance.<br /><br />Cheers,<br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-89887925237077871282017-05-05T14:57:15.924-04:002017-05-05T14:57:15.924-04:00Hi Ernie,
Thanks for the reply and very nice post...Hi Ernie,<br /><br />Thanks for the reply and very nice post on the link between the two frameworks. Remember though, MV framework was originally derived to optimise expected wealth, granted in a one-period setting but the main trick is to make sure your inputs for the horizon of choice are correct. This was John's initial point on distribution projection and subsequent conversion.<br /><br />On the second point, I'm afraid I just don't agree with you. There is an I consistency in the mathematics. But I don't think we'll get any further going down this road so I'll leave it here. I urge you to read Meucci's 2005 textbook where he deals with exactly this issue. Thanks for the interaction though and for providing a very good blog.<br />EmlynEmlyn Flinthttp://www.blogger.com/profile/03419867054448700198noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-73651394137347840132017-05-05T09:29:46.471-04:002017-05-05T09:29:46.471-04:00Hi Emlyn,
Actually, I have shown that Mean-Varianc...Hi Emlyn,<br />Actually, I have shown that Mean-Variance optimization is equivalent to Kelly optimization in the 1-period case, except for the overall optimal leverage employed which mean-variance optimization doesn't provide. (See http://epchan.blogspot.com/2014/08/kelly-vs-markowitz-portfolio.html). However, Mean Variance optimization does not optimize multi-period growth, hence there is no need to compute expected wealth.<br /><br />The derivation of E[P(t)] is not as simple as you outlined. It isn't based on expectation of a linear return, extrapolated to t. My derivation was in the main text, so I won't repeat it here. The key formula to use is E[exp(x)]=exp(μ+σ^2 /2). Also, sigma^2 = s^2 is correct. Though the mean net return is not the same as the mean log return, the standard deviation of the net return IS the same as the standard deviation of the log return (to first order approximation.) I multiplied that by t in t * s^2 because this is a Gaussian Brownian Motion, hence the standard deviation at time t scales linearly with t. It doesn't matter whether you use sigma or s in this formula since they are the same.<br /><br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-73072765200731409522017-05-05T08:54:37.037-04:002017-05-05T08:54:37.037-04:00Hi Ernie,
My mention of portfolio optimization wa...Hi Ernie,<br /><br />My mention of portfolio optimization was because this is one application where you explicitly require expected wealth (or at least expected linear return) estimates. Mean-variance is the classic example. It does not hold true if you use expected log returns.<br /><br />The binomial tree holds in generality as step size is fully general. I understand your point about short-term linear returns being a first-order approximation of log returns (from Taylor series expansion of exponential funciton) but that is a separate issue. My point is that expected PRICE is not equal to P_0 * exp(t*m) because you have defined m as the expectation of the linear returns. Expected price is equivalent to expected linear return because your time is known and assuming log-normality as per your discussion above, you have the relationship Exp(LinRet) = exp(t * (mu + 1/2*sigma^2)) - 1. The mu and sigma here are the drift and volatility parameters input directly into the geometric brownian motion and thus relate to the log-returns. Above, you have incorrectly stated that sigma^2 = t * s^2 (where s is vol of linear returns, not log returns) which is where the final error in the expected price occurs. Dropping time for now, s^2 = [exp(sigma^2) - 1] * [exp(2*mu + sigma^2]. Hope this clarifies.<br /><br />EmlynEmlyn Flinthttp://www.blogger.com/profile/03419867054448700198noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-2950091215315877662017-05-05T07:50:04.900-04:002017-05-05T07:50:04.900-04:00Hi Emlyn,
There is no portfolio optimization invol...Hi Emlyn,<br />There is no portfolio optimization involved in this discussion. It is purely a question of whether it is reasonable to compute expected wealth vs computing expected log returns. The authors (and I) demonstrated that computing expected log returns is the only reasonable way, for a single investor in a single strategy. If you want to know the average wealth of 100,000 investors, or 100,000 strategies, it is reasonable to compute expected wealth.<br /><br />Also, your demonstration seems to corroborate instead of refuting my calculation. Your binomial tree formula only holds when t is small, since you have to update your returns frequently in discrete time. For small t, exp(mt)=exp(m)^t~(1+m)^t just as your wrote.<br /><br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-36660583763442650902017-05-05T05:13:33.622-04:002017-05-05T05:13:33.622-04:00Hi
I'm with John on this. It's a non-issu...Hi<br /><br />I'm with John on this. It's a non-issue. Keep your estimation separate from your portfolio optimization/analysis and once you've projected your log returns to the correct horizon do the necessary conversions thereafter.<br /><br />Also, I think your formula for expected price is incorrect: E(P_t) = exp(t*m). If you have defined m as the expectation of the linear price returns, then a simple recombining tree using +10% and -5% jumps will quickly show you that E(P_t) = [ 1 + (10% + -5%)/2]^t = (1+2.5%)^t = (1+m)^t != exp(m*t). <br /><br />EmlynEmlyn Flinthttp://www.blogger.com/profile/03419867054448700198noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-69346675651652054082017-05-05T05:07:01.283-04:002017-05-05T05:07:01.283-04:00This comment has been removed by the author.Emlyn Flinthttp://www.blogger.com/profile/03419867054448700198noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-1728982039097473252017-05-04T20:23:49.630-04:002017-05-04T20:23:49.630-04:00John,
mu is the average 1-period log return. As l...John,<br /><br />mu is the average 1-period log return. As log return is ergodic, there is no difference between time or ensemble average.<br /><br />Wealth grows over time whether you compute the time or ensemble average. But the difference is that the formula for average wealth displayed in my article is independent of risk. But that average wealth applies only if you buy 100,000 stocks, each have same mean return and standard deviation of returns, and you are interested in the portfolio's return. If you own only 1 stock, then your time-averaged wealth will be reduced by the standard deviation, but I did not display the formula there. What I displayed is the averaged growth rate of wealth, which clearly shows it is reduced by s^2/2. It is not a matter of whether the mean changes over time: it doesn't.<br /><br />Ernie<br /><br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-66407949101247549292017-05-04T17:27:52.722-04:002017-05-04T17:27:52.722-04:00I suppose part of my confusion is on the distincti...I suppose part of my confusion is on the distinction between ensemble average and time average. I looked up the difference here<br />http://www.nii.ac.jp/qis/first-quantum/forStudents/lecture/pdf/noise/chapter1.pdf<br /><br />I still don't know why I should be convinced...<br /><br />First, the mu in our above comments are in the frequentist sense calculated as time average. For one individual stock, there is no ensemble. There is only one realization in the past.<br /><br />Second, I'm not really even sure why the difference between time averages and ensemble averages matters. I'm with you completely on the importance of erdogicity, but wealth is supposed to grow over time. Wouldn't it be a bad thing if its mean was unchanged over time?<br /><br /><br />Johnhttp://www.blogger.com/profile/01457388998903348000noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-81981287801918120162017-05-04T15:00:56.732-04:002017-05-04T15:00:56.732-04:00John,
What you have done seems exactly what I did ...John,<br />What you have done seems exactly what I did in my post. The result is that the expected price or log price depends only on average 1-period net (not log) return, but not the standard deviation of the net return. But the calculation involves an ensemble average E[exp(x)]=exp(μ+σ2 /2), not a time average. If x is not ergodic, the ensemble average isn't equal to the time average, and I am unaware of an analytical formula for a time average. <br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-64413263534268607682017-05-04T13:52:17.071-04:002017-05-04T13:52:17.071-04:00Sorry, I had typed it up wrong. I had meant the lo...Sorry, I had typed it up wrong. I had meant the log return. So for instance, what's the issue with saying<br /><br />X_t ~ N(mu, sigma)<br />where X_t is the log return. Projecting this out n periods gives<br />X_t_n ~ N(mu*n, sigma*sqrt(n))<br />then converted to price you have<br />Y_t_n ~ exp(X_t_n)<br /><br />So your distribution at the horizon is log normal. <br /><br />Then you express utility on the distribution of the price at horizon. Johnhttp://www.blogger.com/profile/01457388998903348000noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-81690175015507118342017-05-04T09:54:36.532-04:002017-05-04T09:54:36.532-04:00John,
No, you misunderstood. The paper states that...John,<br />No, you misunderstood. The paper states that log price (or price) is NOT an ergodic variable. Only changes in log prices is. Change in log price is log return.<br /><br />ErnieErnie Chanhttp://www.blogger.com/profile/02747099358519893177noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-22464317119264145432017-05-04T09:52:51.656-04:002017-05-04T09:52:51.656-04:00So if log price is an ergodic variable, then what&...So if log price is an ergodic variable, then what's wrong with projecting that into the future and converting it to a price?Johnhttp://www.blogger.com/profile/01457388998903348000noreply@blogger.comtag:blogger.com,1999:blog-35364652.post-22937581917554039812017-05-04T09:49:50.747-04:002017-05-04T09:49:50.747-04:00I don't grok this paper.
On the surface it f...I don't grok this paper. <br /><br />On the surface it feels like it's mainly addressing 100 year old arguments. There are very few references to recent economics/finance books or articles. Johnhttp://www.blogger.com/profile/01457388998903348000noreply@blogger.com