Recent Questions - Quantitative Finance Stack Exchange most recent 30 from quant.stackexchange.com 2019-11-18T16:02:53Z https://quant.stackexchange.com/feeds https://creativecommons.org/licenses/by-sa/4.0/rdf https://quant.stackexchange.com/q/49781 1 Pairs Trading parameters Bikenfly https://quant.stackexchange.com/users/12142 2019-11-18T15:45:41Z 2019-11-18T15:45:41Z <p>I am looking to optimize the open/close signals and time for a pairs trading strategy my partner and I are researching. We don't want to go p-hacking so we have been trying to decide:</p> <ul> <li><p>We have 20+ years of data. I believe that using this entire data set may lead us to the wrong conclusion and that the appropriate mean and sd of the pair may have changed over time, so we are trying to isolate the appropriate time period to identify the basic signal parameters. We could test a bunch of different time windows, but I think that takes us down the p-hacking route. Thoughts on how to isolate the relevant time period without introducing bias. </p></li> <li><p>Once we isolate the signal (after conquering the above issue), we want to optimize when we the signal is at its most divergent within a reasonable time period, and optimize the mean reversion period. I imagine this relates to the edge that the signal has, but am not sure. Let's say we decide that the signal becomes relevant at 2 sd, how can we not reasonably miss if the signal is going to continue to expand beyond 2 sd? I guess that is directly related to the edge we are looking to obtain (if there at all) and our risk tolerance. And the same question on when the signal is telling us to exit. If we have one hard parameter again, lets say 2 sd, we could be entering and exiting at that point all day long and only incurring transaction costs, but not exploiting the signal. Again, this leads me to think that it depends on: a) the maximum edge in the signal available, b) how much of that edge we are willing to take or risk. Basically we are looking to identify in the signal the optimum entry and exit triggers.</p></li> <li>We also have a few different pairs we can look at, about 10, but again, we don't want to p0hack, but we want to test each potential pair without inserting bias. My initial thought was just test them all, but my partner said "p hacking" - and the same thought he had with the mean reversion period. We can't look at the data to identify it, we should have a clue and test, which is reasonable, but I it seems counter-intuitive to NOT use the data to tell us when the mean reversion is occurring. </li> </ul> <p>Any thoughts appreciated.</p> https://quant.stackexchange.com/q/49780 0 Value premium analysis - Equal or Value-weighted Portfolios? user43224 https://quant.stackexchange.com/users/43224 2019-11-18T15:41:39Z 2019-11-18T15:41:39Z <p>I got a question regarding the analysis of the value premium in the U.S. stock market.</p> <p>The task is to use the market-to-book-value ratio to split the S&amp;P500 in five portfolios (rank 1-100,101-200,..). Subsequently I have to do a regression for excess returns and analyze the alphas. </p> <p>I'm just not sure wheter I should weight the companies within the portfolios equally or based on their market cap. I'd say that choosing equal weights would emphasize small companies. Because of the (small-)size effect I expect the observed value premium to be larger, with value-weights smaller.</p> <p>But what is one method more appropriate/ better? I'm using Kenneth Frenchs market premium which is value-weighted, maybe because of that I should also use value-weighted portfolios?</p> <p>Happy to hear your thougts!</p> https://quant.stackexchange.com/q/49778 0 Effective gamma/vega hedging Avram https://quant.stackexchange.com/users/43363 2019-11-18T14:00:46Z 2019-11-18T14:00:46Z <p>I want an options position where I can short some options to pocket the premiums and benefit from the time decay. I also want to be vega and gamma neutral.</p> <p>Is there an established way to find which are the most efficient contracts to hedge your gamma and vega for lowest cost, whilst maintaining as much theta as possible?</p> https://quant.stackexchange.com/q/49774 0 Constructing Daily Term Structure hao https://quant.stackexchange.com/users/35174 2019-11-18T08:22:52Z 2019-11-18T08:22:52Z <p>I am very new to QuantLib and am trying to do Swaption Model calibration following the example here:<a href="http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html" rel="nofollow noreferrer">http://gouthamanbalaraman.com/blog/short-interest-rate-model-calibration-quantlib.html</a></p> <p>Appreciate if someone could help me with the following question:</p> <ol> <li><p>what is model behind the implied volatility data as the input for calibration? On bloomberg there are black model and normal model. I am thinking is black model as the vol for normal model is generally much smaller.</p></li> <li><p>How to feed in the term structure from the market and do the interpolation? Using Bloomberg I can get the discount factors and the zero rate for 1 week up to 50 years. How should I provide this data into the YieldTermStructureHandle function to construct my term structure?</p></li> </ol> https://quant.stackexchange.com/q/49773 0 volume of SP500 index on yahoo finance Modi Chen https://quant.stackexchange.com/users/43356 2019-11-17T22:52:28Z 2019-11-17T22:52:28Z <p>I noticed the SP500 index (^GSPC) daily volume on yahoo finance was about the same as the the SP500 index (SPX) volume on stockchart.com at the time of market close. But it became about 2x larger on the next day. For example, if I check Nov 14 SP500 volume at 17:00 pm Nov 14, they are the same. If I check them again in the morning of Nov 15, yahoo's value became 2x larger, while stockchart.com was still the same. I wonder what happens to the SP500 volume on yahoo after market close. How does yahoo or yahoo's data source calculate the volume? </p> https://quant.stackexchange.com/q/49772 0 How to effectively execute a strategy with close price? [duplicate] Modi Chen https://quant.stackexchange.com/users/43356 2019-11-17T21:55:46Z 2019-11-17T21:55:46Z <div class="question-status question-originals-of-duplicate"> <p>This question already has an answer here:</p> <ul> <li> <a href="/questions/49727/live-trading-strategies-developed-on-daily-data" dir="ltr">Live trading strategies developed on daily data</a> <span class="question-originals-answer-count"> 2 answers </span> </li> </ul> </div> <p>I backtested a strategy based on close price. However, for real trading, in order to decide my position for the next day, I need to know the close price for the current day. In other words, I need to wait till the market close to decide if I should buy, hold, or sell. Since the market has already closed, I can only execute my orders in the after-market trading period, which is not very liquid. I wonder what are possible ways to improve the execution. </p> https://quant.stackexchange.com/q/49770 0 I am getting an Invalid API call from Alpha Vantage TIME_SERIES_DAILY_ADJUSTED for Mexico or Toronto Stocks (with a period). Why? Molasar https://quant.stackexchange.com/users/43355 2019-11-17T19:00:54Z 2019-11-17T20:19:05Z <p>I have used the following:</p> <p><a href="https://www.alphavantage.co/query?function=SYMBOL_SEARCH&amp;keywords=URBI&amp;apikey=nnnnnnnnn" rel="nofollow noreferrer">https://www.alphavantage.co/query?function=SYMBOL_SEARCH&amp;keywords=URBI&amp;apikey=nnnnnnnnn</a></p> <p>I get back this:</p> <pre><code>{ "bestMatches": [ { "1. symbol": "URBDF", "2. name": "Urbi, Desarrollos Urbanos, S.A.B. de C.V.", "3. type": "Equity", "4. region": "United States", "5. marketOpen": "09:30", "6. marketClose": "16:00", "7. timezone": "UTC-05", "8. currency": "USD", "9. matchScore": "0.7273" }, { "1. symbol": "URBI.MEX", "2. name": "Urbi, Desarrollos Urbanos, S.A.B. de C.V.", "3. type": "Equity", "4. region": "Mexico", "5. marketOpen": "08:30", "6. marketClose": "15:00", "7. timezone": "UTC-06", "8. currency": "MXP", "9. matchScore": "0.6667" }, { "1. symbol": "4GP.FRK", "2. name": "Urbi, Desarrollos Urbanos, S.A.B. de C.V.", "3. type": "Equity", "4. region": "Frankfurt", "5. marketOpen": "08:00", "6. marketClose": "20:00", "7. timezone": "UTC+01", "8. currency": "EUR", "9. matchScore": "0.1778" } ] } </code></pre> <p>So I want to query URBI.MEX.</p> <p>I do this:</p> <p><a href="https://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&amp;symbol=URBI.MEX&amp;apikey=nnnnnn" rel="nofollow noreferrer">https://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&amp;symbol=URBI.MEX&amp;apikey=nnnnnn</a></p> <p>I get back this:</p> <pre><code>{ "Error Message": "Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_DAILY_ADJUSTED." } </code></pre> <p>Why? URBI.MEX is in their catalog I would assume, judging by the first API call.</p> <p>Have tried URBI.MX, URBI-MX, URBI-MEX to no avail.</p> https://quant.stackexchange.com/q/49769 0 Statistics related question about ruin theory James Debenham https://quant.stackexchange.com/users/42219 2019-11-17T16:15:15Z 2019-11-18T15:47:38Z <p>I am trying to solve the following problem:</p> <p>'An insurance company has an initial surplus of 150 and premium loading factor of 15%. Assume that claims arrive according to a compound Poisson process <span class="math-container">$(S(t))_{t≥0}$</span> with parameter <span class="math-container">$λ = 10$</span> and claim size <span class="math-container">$X_i ∼ exp( 1/20 )$</span>. The time unit is 1 week. Assume that 1 month is 4 weeks.'</p> <p>(a) Calculate the average number of claims on any given day, week and month, and the probability that at least one claim occurs within the next 3 days. Calculate also the probability that at least 3 claims occur in the next 3 days.</p> <p>(b) Let t = 2 months. Calculate the mean and variance of <span class="math-container">$S(t)$</span> and of <span class="math-container">$U(t)$</span>.</p> <p>(For reference in case of different notation usage, S(t) represents the aggregate claim amount i.e. the claims paid, and U(t) denotes the surplus process. U(t) = u + ct - S(t) where c is the rate of income of premiums per unit time, t is time. )</p> <p>This question popped up as an exercise regarding the topic of ruin theory. I know it is heavily intertwined with statistical theory, but I hope I am posting this question to the relevant page. I'm not too sure how to begin this question so any explanations or pointers would be helpful. Do let me know if anything extra needs clarifying. Thank you!</p> https://quant.stackexchange.com/q/49768 0 How do CCAR models come together to create a prediction of capital adequacy? Nagesh Rathi https://quant.stackexchange.com/users/43354 2019-11-17T16:04:21Z 2019-11-17T23:39:40Z <p>I have a question about the Comprehensive Capital Analysis and Review (CCAR) process for US banks.</p> <p>I understand that the PPNR (Pre-Provision Net Revenue) Models and Loss models can create a predicted balance sheet for the next 9 quarters for a bank but how does one say if capital is adequate from this predicted balance sheet?</p> https://quant.stackexchange.com/q/49766 0 Arithmetic Asian Option Anon https://quant.stackexchange.com/users/42648 2019-11-17T11:53:02Z 2019-11-17T15:02:30Z <p>Assume the risk-free bond Bt and the stock St follow the dynamics of the Black &amp; Scholes model</p> <p>without dividends (with interest rate r, stock drift <span class="math-container">$μ$</span> and volatility <span class="math-container">$σ$</span>). </p> <p>Let <span class="math-container">$A_T:=\frac{1}{T}\int_{0}^{T}S_tdt$</span>. Define <span class="math-container">$A^*_{T}:=S_{0}\frac{A_T}{S_T}$</span>.Show that under the measure <span class="math-container">${Q}^S$</span> the random variable <span class="math-container">$A^*_{T}$</span> has the same law <span class="math-container">$A_{T}^{(2)}=\frac{1}{T}\int_{0}^{T}S^{(2)}_tdt$</span> where <span class="math-container">$dS_{t}^{(2)}=S_{t}^{(2)}(-rdt+\sigma dW_{t}^{(2)})$</span> where <span class="math-container">$W_{t}^{(2)}$</span> is a Wiener process. </p> <p>How exactly would you that it has the same law? The only approach I can think of is by Ito's lemma and showing that it's a martingale? But I'm not entirely sure. </p> <p>Really appreciate the help. Thank you! </p> https://quant.stackexchange.com/q/49765 -5 Renassiance fund [on hold] user43350 https://quant.stackexchange.com/users/43350 2019-11-17T11:44:13Z 2019-11-17T11:44:13Z <p>Was the success of the Renaissance fund genuine? Or did they simply pile everything into mortgage backed securities and everyone withdrew in 08 because they were using it like a bank?</p> https://quant.stackexchange.com/q/49764 0 Replication; modelled or historical distribution? Keep these mind https://quant.stackexchange.com/users/13924 2019-11-17T04:54:05Z 2019-11-17T04:54:05Z <p>For a limited time (a few months) only, I want to replicate a target portfolio (consisting of asset classes) with all the asset classes in such target portfolio minus a few. I only have 5+ years of complete data. I seek to minimise the ex-ante tracking error.</p> <p>Which method is better, and why?</p> <ol> <li>Assume log-normality, derive a covariance matrix, and minimise the volatility of the difference between the portfolio and the target portfolio</li> <li>Simply minimise the historical volatility of the difference between the portfolio and the target portfolio</li> </ol> https://quant.stackexchange.com/q/49762 0 inverse futures hedging herrzitrone https://quant.stackexchange.com/users/43347 2019-11-17T01:31:37Z 2019-11-17T01:31:37Z <p>This is my first question here and I hope I don't make any mistakes. </p> <p>I have kind of a problem with spreading and hedging inverse futures such as Bitmex 3m or 6m XBTUSD contracts due to their non - linearity. </p> <p>They have sensitivity towards interest rates and the spot market, but no matter how I twist and turn it, I cannot figure out how to create a spread (e.g. 3m-6m) that is neutral to even one of these variables. </p> <p>A dollar neutral spread acts like a risk reversal, a BTC neutral spread is not neutral to DV01, an interest rate neutral hedge ration is all over the place when it comes to spot sensitivity...</p> <p>I just think I don'T understand these things at all...where do I start to look?</p> https://quant.stackexchange.com/q/49758 0 Black Scholes theta as function of time to maturity luca dibo https://quant.stackexchange.com/users/42207 2019-11-16T23:07:14Z 2019-11-17T00:33:24Z <p>I would like to understand why the Black and Scholes greek letter theta for european call option behave in the following way:</p> <ul> <li><p>as time to maturity is far away (right part of the x-axis in the the graph) theta is small for all the call options (ATM, ITM e OTM). Therefore this means that the call value decrease by a small amount as time passes when time to maturity is far away.</p></li> <li><p>as time to maturity approach zero, i.e. close to the expiry, (left part of the x-axis in the graph) ITM and OTM call option theta get close to zero (i.e. theta decrease in absolute value) while ATM call option theta get bigger and bigger in absolute value. Therefore, when we are close to maturity, ATM call option decrease in value much more than ITM and OTM call option due to passage of time.</p></li> </ul> <p>Can someone explain me why is that? I would like to understand the underlying concepts.<a href="https://i.stack.imgur.com/21FwT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/21FwT.png" alt="a"></a></p> https://quant.stackexchange.com/q/49757 0 Why does MVO cause highly concentrated asset allocations? Jojo https://quant.stackexchange.com/users/11917 2019-11-16T22:49:31Z 2019-11-16T23:25:32Z <p>Why does Mean Variance Optimization resulted in highly concentrated asset allocations? This is standard knowledge that it does but Im unable to find the reason for it. And Robust Optimization seems to have been used as a way to overcome this issue, but I dont see how it helps with concentrated asset allocations, despite its clear benefits in reducing sensitivity to input parameters. </p> https://quant.stackexchange.com/q/49754 0 Downward-sloping volatility skew in equity prices Betty https://quant.stackexchange.com/users/19479 2019-11-16T19:00:57Z 2019-11-16T19:58:05Z <p>I’m learning the market price for FRM, and I’m having a hard time understand a question in the assessment:</p> <p><img src="https://i.stack.imgur.com/1gCBO.jpg" alt="enter image description here"></p> <p>From my understanding, the volatility skew for equity is the graph on the right upper corner:</p> <p><img src="https://i.stack.imgur.com/s9TcM.jpg" alt="enter image description here"></p> <p>So with strike price going up, the implied volatility goes down, and the equity option price goes down due to less need for “protection”.</p> <p>But my question is: the explanation says “a heavy left tail puts more mass or probability on the up side or higher side of stock prices.” Why is this? Doesn’t a heavy left tail— like the graph in the first picture, show a higher probability for lower strike and lower stock price? So why is B wrong? </p> <p>Thank you!</p> https://quant.stackexchange.com/q/49753 1 Survival bias when backtesting Hairy Ass https://quant.stackexchange.com/users/43339 2019-11-16T14:37:17Z 2019-11-18T09:11:09Z <p>I have been doing backtesting, and I am seeking to see if there are any flaws in my program, as it seems to be too good to be true. </p> <p>Based on stocks with market capitalization of > 10B, go back in times say 20 years and backtest. For each stock, Look at the historical data, stock chart morphological feature, and other features, do a bunch of calculation, assign it a score. On each period, it will pick stocks with good scores. </p> <p>One of the thing I see is that there can be survival bias. The list of stocks I screen have a market capitalization of > 10B TODAY. So only those who survive today is included. Those who goes out of business were secretly gone without me knowing. Those who survive and become great enough to have 10B capitalization are included. So that's far from ideal.</p> <p>If it is possible, I would like to get a list of stocks with market capitalization > 10B 20 years ago. But where do I get that list of stock? Is there other ways to avoid that bias?</p> https://quant.stackexchange.com/q/49752 0 Black-Scholes model - Calibration of the risk-free rate cruiser0223 https://quant.stackexchange.com/users/41536 2019-11-16T14:27:53Z 2019-11-16T14:27:53Z <p>I know there is a lot of content about this topic, but I have not seen a post which gives a satisfying answer to my problem.</p> <p>I am trying to hedge a European call option with real market data under the Black-Scholes model (or Bachelier model - it does not matter right now). </p> <p>I have for every trading day a discount curve and a forward rate curve. Since my option runs only for 60 days (<span class="math-container">$T$</span>=60), I decided to not distinguish between the both curves. I have the requirement to fix all parameters (and they should be constant for now) at the first trading day. </p> <p>However, I need to calibrate my model to the market data. I think it is clear for the volatility, I look in the vol. surface and pick the exact vol. value (with maturity) for my option. Regarding the risk-free rate I wanted to do the same, look in the forward rate curve and get the rate <span class="math-container">$B(T)$</span> for the option maturity. Then I could draw <span class="math-container">$r$</span> by <span class="math-container">$$r = \frac{\log(B(T))}{T}$$</span>.</p> <p>But, would it be smarter to take <span class="math-container">$B(t)$</span> for <span class="math-container">$t$</span> being the first trading day after <span class="math-container">$0$</span>? The "bank account" grows within the sort-rate, doesn't it? So I would take the first value of the forward curve to calibrate the risk-free rate. My intuition is, that the bank account would have maximal liquidity, since money in the bank account should be ready for transfers all the time.</p> <p>My question is, which of the both approaches makes more sense? Have I forgotten something important?</p> <p>Thanks for taking your time.</p> https://quant.stackexchange.com/q/49751 0 Notation for the variance in papers Marine Galantin https://quant.stackexchange.com/users/43187 2019-11-16T14:17:38Z 2019-11-16T14:17:38Z <p>Here is a screenshot from : LIM Quadratic hedging and mean variance portfolio selection with random parameters in an incomplete market <a href="https://i.stack.imgur.com/Fns0X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fns0X.png" alt="enter image description here"></a></p> <blockquote> <p>When I deal with mean variance portfolios, I usually see the notation J as something to be minimized. I think it denotes the variance, but why one would use the letter J ? Is it something simply conventioned or does it have a story ?</p> </blockquote> https://quant.stackexchange.com/q/49748 1 Asian Options-Change of Numeraire Anon https://quant.stackexchange.com/users/42648 2019-11-16T05:09:32Z 2019-11-16T17:25:34Z <p>Assume the risk-free bond <span class="math-container">$B_t$</span> and the stock <span class="math-container">$S_t$</span> follow the dynamics of the Black &amp; Scholes model</p> <p>without dividends (with interest rate r, stock drift <span class="math-container">$\mu$</span> and volatility <span class="math-container">$\sigma$</span>). Show that <span class="math-container">$S_{u;T} := \frac{S_{u}}{S_T}$</span> under the measure <span class="math-container">$Q^S$</span> (with the stock as a numeraire) can be written as <span class="math-container">$exp\{(-r-\frac{\sigma^2}{2})(T-u)+\sigma\hat{W}_{T-u}\}$</span> where <span class="math-container">$\hat{W}_t$</span> for <span class="math-container">$t\in[0,T]$</span> has the same law of a Wiener process under the <span class="math-container">$Q^S$</span> measure. </p> <p>I'm stuck on how to solve this question. Would really appreciate the help.</p> https://quant.stackexchange.com/q/49745 1 Would FFR fall if the Fed set IOER to 0? Jonah https://quant.stackexchange.com/users/42567 2019-11-15T23:02:23Z 2019-11-16T04:57:25Z <p>Even though we're currently in a corridor system and not a floor system (since FFR > IOER), if Interest On Excess Reserves were set to 0, wouldn't that cause the Federal Funds Rate to drop considerably? I'm thinking that even though FFR > IOER, IOER is still supporting FFR because it lowers the cost of holding excess reserves, increasing demand for interbank loans. If IOER were set to zero, the cost of borrowing reserves would increase because it would no longer be offset by IOER.</p> <p>For example, if bank A loans reserves to bank B, B is paying 1.55% (FFR) interest to A, but B is collecting 1.50% (IOER) interest on its reserves, so the loan is only costing B 0.05% interest. If IOER were zero, the loan would cost B the full 1.55% and might not be worth it anymore.</p> <p>I guess the best answer would be a formula that can predict changes to FFR from changes in IOER, the discount rate and supply of reserves. The graph depicted <a href="https://libertystreeteconomics.newyorkfed.org/2012/04/corridors-and-floors-in-monetary-policy.html" rel="nofollow noreferrer">here</a> shows a relationship between the three, but I'm wondering what that graph would look like if the IOER parameter were changed.</p> https://quant.stackexchange.com/q/49743 0 Usage of calculations / models in decision making [on hold] Mark C https://quant.stackexchange.com/users/43330 2019-11-15T22:14:54Z 2019-11-15T23:07:41Z <p>This is probably extremely naive and a dumb question but how are models used to profit? If firms use the same popular calculations / models in their decision making, wouldn't they all come to the same conclusion? Do firms use a variety of calculations and make decisions based on some arbitrary number of positive signals? I ask this as I come from a programming background and want to attempt to make some sort of trading bot for practice, and plan to calculate various popular measurements and having the bot trade in the event of having more than X positive signals.</p> https://quant.stackexchange.com/q/49742 0 step by step calculation of the sharpe ratio user8959427 https://quant.stackexchange.com/users/42943 2019-11-15T21:45:47Z 2019-11-15T22:46:44Z <p>I am trying to calculate the Sharpe ratio. Suppose I have:</p> <p><span class="math-container">$$x_t = \alpha + \beta y_{t} + \epsilon_{t}$$</span></p> <p><span class="math-container">$$E[x_{t}] = \alpha + \beta E[y_{t}]$$</span></p> <p><span class="math-container">$$var[x_{t}] = \beta^2var[y_t] + \sigma^2$$</span></p> <p>The Sharpe ratio is:</p> <p><span class="math-container">$$\dfrac{E[x_{t}]}{\sqrt{var[x_{t}]}}$$</span></p> <p>I am trying to go from the above Sharpe ratio to the following output (but step-by-step showing everything I am doing):</p> <p><span class="math-container">$$\dfrac{\alpha + \beta E[y_{t}]}{\sqrt{\beta^2 var[y_t] + \sigma^2}}$$</span></p> <p>Does anybody have some step-by-step solution? Or if there is somewhere online where I can see step-by-step how its calculated.</p> https://quant.stackexchange.com/q/49741 0 some doubts about answers to ticket line question from interview book M00000001 https://quant.stackexchange.com/users/43168 2019-11-15T18:05:03Z 2019-11-18T15:28:42Z <p>I'm reading an interview book called A Practical Guide to Quantitative Finance Interviews (nickname: Greenbook) and cannot understand the answer to the following question:</p> <p>Question: From Chapter 5/5.2</p> <p>Ticket Line:</p> <p>At a theater ticket office, 2n people are waiting to buy tickets, n of them have only 5 dollar bills and the other n people have only 10 dollar bills. The ticket seller has no change to start with. If each person buys one $5 ticket, what is the probability that all people will be able to buy their tickets without having to change positions?</p> <p>I have some doubts (highlighted in bold below) about the answer and really appreciate your advice.</p> <p>Here is the answer from the book:</p> <p>Assign +1 to the n people with 5 dollar bills, and assign -1 to the n people with 10 dollar bills. Consider the process as a walk. Let (a,b) represent that after a steps, the walk ends at b. So we start at (0,0) and reaches (2n,0) after 2n steps. For these 2n steps, we need to choose n steps as +1, so there are 2n Cr n = 2n!/(n!*n!) possible paths. We are interested in the paths that have the property "b>=0, ∀a&lt;2n and a>0". It's easier to calculate the number of complement paths that reach b=-1, ∃a&lt;2n and a>0. As shown in the attached screenshot<a href="https://i.stack.imgur.com/iz9sY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iz9sY.jpg" alt="Screenshot"></a>, if we reflect the path across the line y = -1 after a path first reaches -1,</p> <p><strong>Doubt: how come we can assume a path reaches -1 because I think we're interested in b>=0 and we never reaches b below 0</strong></p> <p>for every path that reaches (2n,0) at step 2n, we have one corresponding reflected path that reaches (2n,-2) at step 2n. For a path to reach (2n,-2),there are (n-1) steps of +1 and (n+1) steps of -1. So there are [2n Cr (n-1)] = 2n!/((n-1)!*(n+1)!) such paths. The number of paths that have the property b = -1, ∃ a&lt;2n and a>0, given that the paths reaches (2n,0) is also [2n Cr (n-1)]</p> <p><strong>Doubt: why the number of paths that have the property b = -1 is [2n Cr (n-1)] ?</strong></p> <p>And the number of paths that have the property b>=0, ∀ a&lt;2n and a>0 is: [2n Cr n]-[2n Cr (n-1)] = (1/(n+1))*[2n Cr n]. Hence, the probability that all people will be able to buy their tickets without having to change positions is 1/(n+1)</p> https://quant.stackexchange.com/q/49737 0 Basic Monte Carlo Present value calculation in R question Jorisdrees https://quant.stackexchange.com/users/36094 2019-11-15T14:10:47Z 2019-11-18T15:47:19Z <p>I'm self studying monte carlo applications with the application towards present values. </p> <p>However the values that I am using are of the uniform distribution variety with a pre defined minimum and maximum value.</p> <p>I'm trying to apply the central limit theorem to it so it should approximate a normal distribution giving me the values that are more likely than others. </p> <p>Now i'm having some difficulties applying the CLT to my current set up. </p> <pre><code>#Empty variable to store the list in results = NULL #loop for(i in 1:1000){ #rate between 1% and 20% r &lt;- runif(1, 0.01, 0.2) #expected capital return k &lt;- runif(1, 500, 900) #periods p &lt;- 2 #do the actual calculation pv &lt;- k * (1 + r)^p #Store the calculation results &lt;- rbind(results, pv) } histogram &lt;- hist(results) plot(histogram) summary &lt;- summary(results) print(summary) standarddeviation &lt;- sd(results) print(standarddeviation) 165.108 V1 Min. : 512.2 1st Qu.: 727.8 Median : 848.8 Mean : 856.8 3rd Qu.: 974.8 Max. :1292.6 </code></pre> <p>So what I take from this is that the mean is 856.8 and this is what the project currently would be worth investing for to me more or less. </p> <p>I am wondering if my methodology and reasoning is correct because I feel I might have gone off the deep end. </p> https://quant.stackexchange.com/q/49734 3 Negative theta for long OTM put? ThetaImmuniser https://quant.stackexchange.com/users/43329 2019-11-15T12:30:52Z 2019-11-15T17:55:24Z <p>after a few years following the forum, I have a question to ask.</p> <p>After running the model we use for getting the greeks of options, I got a very odd result for otm long put. </p> <p>i got a positive theta..</p> <p>has anyone any idea on why? this is tested and implement with BS and Crank Nicolson </p> https://quant.stackexchange.com/q/49698 -1 Hull White Cap/Floor calibration Christian M https://quant.stackexchange.com/users/42910 2019-11-13T19:49:23Z 2019-11-16T11:53:31Z <p>I have a problem and I hope someone could help me. </p> <p>I calibrated the Hull-White model to Caps and Floors from t=0 so the bond prices are equivalent to todays term structure. See: <a href="https://quant.stackexchange.com/questions/45458/hull-white-zero-coupon-bond-price-does-not-depend-on-the-volatility">Hull-White zero-coupon bond price does not depend on the volatility?</a></p> <p>For Caps it prices them correctly using the OIS curve as the term structure. But I get huge mispricings for Floors. </p> <p>The mispricing mostly appears for the first 2-5 Caplets and later it disappears.</p> <p>Do you have an idea what the problem could be, or do I have a fundamental mistake?</p> <p>I am just calibrating the HW model to Cap and Floor prices. </p> <p>Thanks in advance Chris</p> https://quant.stackexchange.com/q/49692 2 Is a more robust Covariance estimation possible? George https://quant.stackexchange.com/users/42382 2019-11-13T15:34:42Z 2019-11-17T15:29:45Z <p>I'm working on a mean-variance optimization problem, but instead of financial securities I'm choosing a 'portfolio' of N athletes. It is a 1-period optimization problem over one generic statistic which I'll call <code>performance</code> here. I'm assuming <code>athlete_performance</code> is an N length random vector distributed as multivariate-normal:</p> <p>athlete_performance <span class="math-container">$\sim MVN(\mu, \Sigma)$</span></p> <p>Where <span class="math-container">$\mu$</span> is the 1xN vector of means (or expected performance)</p> <p>and where <span class="math-container">$\Sigma$</span> is an NxN matrix with variance on the diagonal ( <span class="math-container">$\Sigma[i,i]$</span> = <span class="math-container">$Var(i)$</span> ) and covariance on the off-diagonal ( <span class="math-container">$\Sigma[i,j]$</span> = <span class="math-container">$Cov(i,j)$</span> ). </p> <p>My question is about the options available for estimating the covariance (off-diagonal) part of the matrix.</p> <p>My main concern is the <strong>predictiveness</strong> of my covariance matrix. If I were working with securities that had all been listed together for 10 years, then "sample covariance" might be predictive of future covariance, but in sports it's not that simple.</p> <p>Imagine a quarterback and a wide receiver in American Football. How well their performance correlates is dependent on the quality of the pass defense they're playing against. Or in F1 racing, if driver A and B are both strong on straighter tracks, but only driver B is strong on tight cornered tracks, their performances will correlate much differently based on whether the track is straight or zigzag-ing.</p> <p>I'm aware of "sample covariance" which in my case would look at the historical overlap between two athletes. I'm also aware of "<a href="https://scikit-learn.org/stable/modules/covariance.html#shrunk-covariance" rel="nofollow noreferrer">shrunk covariance</a>". I was wondering if there are more robust methods for calculating covariance that would be more predictive of future covariance, possibly using some sort of regression or MCMC.</p> <p>Thank you for reading the question and for your time!</p> https://quant.stackexchange.com/q/46167 0 From Libor Curve rates to "forward" zero-coupons 11house https://quant.stackexchange.com/users/33326 2019-06-18T13:05:08Z 2019-11-16T07:01:45Z <p>I am provided a 6M euribor curve, constructed from FRA's and swaps of tenor 6M on the euro, as well an EONIA curve, constructed from zero-coupons EONIA swaps. Both curves are provided as functions <span class="math-container">$d\mapsto \textrm{rate at }d$</span> which to a date <span class="math-container">$d$</span> associate the rate at <span class="math-container">$d$</span>. (Imagining interpolations modes have been chosen.)</p> <p>With these to curves, I want to calculate a 1Y forward 10Y swap rate. For this I need the discount zero coupons <span class="math-container">$Z_d$</span> and the "forward" zero-coupons <span class="math-container">$Z_f$</span>.</p> <p>I use <span class="math-container">$Z_d (t) = e^{-\textrm{yearfraction(today},t)\times{\textrm{"discount rate at }t"}}$</span> to get a discout factor from the EONIA <em>rate</em> curve.</p> <p>By "forward" zero-coupon I mean the zero-coupons used to calculate the forward 6M euribor rates as : <span class="math-container">$$L_0^{T_{i-1}, T_i} = \frac{Z_f(T_{i-1}) - Z_f(T_i)}{\delta_i Z_f(T_i)}$$</span></p> <p>is the forward euribor rate from now (0) for the future 6M period <span class="math-container">$[T_{i-1}, T_i]$</span> of year fraction <span class="math-container">$\delta_i$</span>.</p> <p>My question is : how do I calculate the <span class="math-container">$Z_f$</span>'s from the rates I am given ?</p> https://quant.stackexchange.com/q/45555 2 Geometric Brownian Motion - Price Probabilities QFII https://quant.stackexchange.com/users/38785 2019-05-11T23:55:34Z 2019-11-16T20:56:30Z <p>I am modeling a stock price that follows Geometric Brownian Motion and have the following:</p> <p><span class="math-container">$E(X)$</span> = .16 (16%)</p> <p><span class="math-container">$\sigma$</span> = .24 (24%)</p> <p><span class="math-container">$X_0$</span> = 95</p> <p><span class="math-container">$T$</span> = 1 (12 months)</p> <p>I am trying to find the probability that the price of this stock will be below 93 at the end of this time period. I am calculating this analytically, using the Log Normal Distribution given as the following:</p> <p><span class="math-container">$P(X,t)$</span> = <span class="math-container">$1\over X $$\cdot$$1\over {\sigma \sqrt{2 \pi t}}$$\cdot$$e^{-(ln(x)- ln(x_0)-(\mu- \sigma^2 /2)t)^2}\over 2\sigma^2t$</span></p> <p>I can plug in the values as the following:</p> <p><span class="math-container">$P(X,t)$</span> = <span class="math-container">$1\over X $$\cdot$$1\over {(.24) \sqrt{2 \pi (1)}}$$\cdot$$e^{-(ln(x)- ln(95)-((.16)- (.24)^2 /2)(1))^2}\over 2(.24)^2(1)\$</span></p> <p>But then I am still left with the X. My question, is this just the 93 value that should be plugged in? Would this represent the probability of the price being below 93 after this time period? What if we wanted to find the probability that the price would close above this 93 (just 1 - this probability)?</p>