instruction
stringlengths
35
27.7k
Hello I was wondering if someone could help me with the following question relating to the stability of an equilibrium in a two good exchange economy and the Walrasian auctioneer. The setting is the following: we consider an exchange economy with two individuals $A$ and $B$ and two goods $x$ and $y$ and consider price...
I have a call option with 2 expiry in two years. For the first 9 months I cannot excercise the option. After that the I can exercise at any time. I am pricing this option using a binomial tree using the traditional back-propagation method. However at node 9 (i.e. month 9) I have to switch from an American option node i...
I have a call option with expiry in two years. In my case the option is bermudan style with first 9 months w/o ability to exercise (i.e. European) and after exercise at any time (i.e. American), but I believe this may not matter and will accept answer for purely american options. This option starts with let's say 100 s...
I want to know about some methods like Methods-of-Moments, Quasi-Maximum Likelihood method, Baysian methods using Markov Chain Monte Carlo methods. Is there any reference to have an idea of these methods? What are the other methods? Is there any special reference for mathematical finance? Thanks
I'm in the process of constructing volatility cones for several assets and I want to make sure the data is free of biases. I know that using overlapping data introduces an artificial degree of correlation between samples and I have the formula for adjustment however I'm unsure how to apply it to the data set. I'm not...
I am reading Cochrane's lecture note here He mentioned that when you regress annual return on time t on that of time t-1, you will have neither statistically significant nor economically significant slope. I performed a quick test with python as follows: import statsmodels.formula.api as smf import pandas as pd import...
For some bonds I work with the last coupon date is not equal to bond's maturity date. E.g. the last coupon date is April 25th, 2020 and maturity date is April 25th, 2021. I looked at Schedule class and MakeSchedule() and I don't see a clear way to reflect this. I feel it can't be that hard, though. Would appreciate if...
I'm not sure if this should be asked elsewhere, but it seems like a good place as any. Options have a strike price, they have an underlying instrument, and they have an expiry. They are also either call or put options, but what is the noun to describe that?
I am an aspiring quant that would like to get a head start learning stochastic calculus, which books FROM EXPERIENCE are the most reader friendly?
I recently noticed that the price history for Google (GOOG) on Yahoo Finance only goes back to when the stock split. For a while I thought they just hadn't gotten around to adjusting the close prices for the split, but it still hasn't been "fixed". Just wondering if this is normal for Yahoo Finance when a stock splits ...
I have two portfolio's called Comb & Global. They both have the same investable universe lets says 3000 stocks & are measured against the same benchmark. So it is possible that both funds hold the same stocks. I would like to examine the correlation of the ex-ante between the two funds. I know I can calculate the ex-an...
This may be a very obvious question, but can someone tell me where and when the names call and put originated? And similarly, where do the terms American and European option come from? Aside from the explanation that it has nothing to do with the continents, I have not seen a textbook that says anything about why they ...
If so, is there a derivation anywhere that shows this? I was told that this could be done in a class but I don't see how it's possible.
Is it possible calculate Value at Risk on an asset without a time horizon? What kind of variables do you need? Variables that are on the table are value, standard deviation, beta, market return, risk free rate, and its realized return. And, of course, confidence level. Can someone give me an example of necessary variab...
What are the most useful results that I should put on a mathematical finance cheat sheet? Am I missing anything important: https://github.com/daleroberts/math-finance-cheat-sheet
versus a standard Generalised Black and Scholes model (if there are any?) I have read the paper but I am not to sure about its practical implications as would people with more experience using this model. Source: http://people.oregonstate.edu/~thomanen/Geo599/Schwartz_Miltersen.pdf
I'm strongly interested to computing Elliott Wave to any given Timeseries. Does anybody tried? Is there any phython library to do that? I'm looking for an algorithm taht if I give to it a time series, it label each movement according to Elliott Wave principle.
It appears q/KDB is being using for Time series analysis for HFT. What are some of the advantages of using q/KDB for HFT time series over other regular time series. Does it provide for multivariate statistical testing etc done normally on time series? Does it provide easy to use facilities for Statistical Arb and te...
Modeling for interest rate derivatives (such as bermudan swaptions) is said to have undergone significant changes since the crisis. Prior to the crisis, counterparty default risk was often ignored, allowing modelers to unify many curves that are now separated. Part of the story is in the Risk article Goldman and the...
Suppose we have an index whose value is calculated by a weighted geometric mean. Now we want to recreate the index using its underlying components. How would we go about calculating the hedge ratios for the underlying components? Would the hedge ratios be dynamic?
I am working on hedging agency MBSs using treasury bonds. So my question raise as which treasury bond should more likely be a hedging underlying of a MBS. What is the matching criteria usually for MBS hedging? Duration matching, coupon matching, maturity matching, or others. Any MBS hedging opinions comments are welcom...
i'm following the "Computational Investing 1" course at Coursera.org, I was affascinated by the Beta arbitrage of CAPM Video: https://class.coursera.org/compinvesting1-002/lecture/view?lecture_id=119 It shows, that if I found Betas and weights, I could make profit in Bearish and bullish markets. Strategy: SHORT for th...
how market makers set the time factor to calculate option greeks on the expiration day? does they set time equal 1/24or 2/24 when only 1hour or 2hour left? what frequency market makers update new time to calculate greeks so that they hedge better?
I would like to know if there is a way (or theory) to manage a multi-strategy, multi-instruments portfolio that would calculate the optimal weight to allocate capital for each combination of strategy and instrument (sometimes we may find one strategy works for many instrument or vice versa). My first idea is that we ca...
Can someone help me with calculating Stochastic Volatility (of stocks and options) using SAS or R or Matlab please? I am new to SAS and I am trying to use Heston model, White-Hull model or any other suitable model but have no idea how to do this in SAS/ R/Matlab. Any help, any codes, any tips, any warnings are all welc...
My question covers a more or less classical portfolio optimization situation with a twist: How to partition assets into minimally correlated portfolios, with and without asset overlap. I have $N$ assets of which I know their price series and thus also covariance matrix. I would like to create a number of portfolios wit...
Return of an investment for a given period is by definition: $$r = \frac{P}{W_0} - 1$$ where $P$ is the price of the investment at the end of the period, and $W_0$ is the initial investment. I want to understand how much the return changes in terms of percentage, with respect to that of the price. This naturally is th...
I am trying to figure out how to turn implied yield volatility of a short-term interest rate into implied price volatility. Is there an equation to do this? I have come across the equation for a bond: (price_vol = yield_vol*modified_duration*forward_yield) But, I do not believe this is correct for a STIR option.
Im trying to calculate monthly ZCB bond prices with a fixed maturity T, over a period of months via Monte Carlo methods. Here is my attempt: For the first month, the price is $P_{t_0}(0,T) = E[exp(-\int_{t_0}^T r_s ds)]$, for the second month, the price is $P_{t1}(0,T) = E[exp(-\int_{t1}^{T+t1} r_s ds)]$, and so on u...
As titled, my question consists on asking for why in the most of academic papers one almost always finds that when you try to model asset returns, one needs to adjust for risk factors before analyzing asset portfolio returns. Someone can explain why is it important and how to do that?
I was wondering whether there are a set of assumptions for portfolio optimisation with higher moments (including kurtosis and skewness) as there are for regular mean-variance optimisation?
I have a return history for a universe of risky assets and I've run a principal component algorithm and obtained a loadings matrix (num_factors by num_assets) for the first 5 factors. I have a portfolio as well (a subset of the above universe) with weights w for each of the assets. This portfolio has a variance \sigma...
Looking for places which can give me historical tick data for free or for the cheapest price. Don't really need it to be live , can be delayed too. What are my options. Mainly looking for tick data for one contract - i.e. NYMEX WTI crude
I am trying to find the empirical copula linking two random variables $X$ and $Y$. I have some data available but it's limited with respect to the variable $Y$ and I am not convinced it's enough data and will lead to the right copula. The variable $Y$ can attain any value greater than 0 and I am interested in the prob...
I am looking for a C# .Net library that provides trade performance analytics similar to R-PerformanceAnalytics. Basic return statistics, draw-downs, risk-adjusted returns, risk (variations), distributional analytics,... I checked all the general Math/Stats C# libraries and I can certainly whip up analytics from several...
I stumbled over the term Non-negative matrix factorization in presentations such as Application of Machine Learning to Finance and this Big Data in Asset Management. The basic idea is to decompose a positive (!) matrix $A$ in $$ A = BC. $$ Then one can interpret $B$ as factor loadings and $C$ as factors. I assume that ...
For the two-variable case, what are the practical differences between using the Engle-Granger procedure versus the Johansen test for cointegration? Is one universally more powerful than the other? Will one give more false positives or false negatives than the other? Should Johansen always be preferred?
Find correlation vector like $[ d e f ]$ where d, e and f represent correlation of P(portfolio) with its assets A, B and C respectively. The assets A, B, C can be another portfolio. In order for that, is it possible to find a correlation matrix including the portfolio along with its asset, given the correlation matrix ...
We have a Cox-Ross-Rubinstein model with parameters $u$ ("up"), $d$ ("down") , $r$ (interest rate) and $q$ (equivalent martingale probability) $(q=(1+r-d)(u-d)^{-1})$ . We have a contingent claim with payoff $$ X=S_1(N)^c $$ where $S_1(N)$ is the final price, and $c$ is a positive integer. I need to show that the init...
In Sinclair's book, wee need to compare standard deviation with "true volatility" to check the power of the model suggested, close -to-cloce, or Parkinson formula, etc. What do we mean here by "true" volatility when we calculate standard deviation, with what we have to compare it with?
What is the definition of price pressure and what does it imply? In a number of paper I read that the price pressure can influence the portfolio returns; can you explain why and in which way it can do that?
I'm self-studying several questions on Ruey S. Tsay's teaching page. I'm experiencing some difficulty getting the correct answer for final exam 2013 Problem B Question 3. Given a Student-t GARCH (1,1) model, I believe that the correct way to calculate 1-Day $VaR$ would be to take the 1-Day predicted mean ($\mu_t$) and ...
I want to construct some time-varying BBX copulas, however, I found that patron's package does not contain time-varying BBX copula. Anybody know where I can download them?
I have two sub portfolios (lets call them portfolio a & portfolio b - a portfolio is just a vector of weights that sum to 1) that combine to create a total portfolio. I also have a 2 x 2 covariance matrix. | Variance a Covariance ab | | Covariance ab Variance b | By taking the square root of the diagonal...
I have issues with this problem: Let $\{X_t, t\in \Bbb N\}$ be a 2-state stationary Markov chain, with transition $M$ (and $M(1,2)\neq 0 \neq M(2,1)$), let $\{W_t, t\in \Bbb N\}$ be a strong Gaussian white noise. Let $$ Y_t = b_{X_t} + \sigma_{X_t} W_t $$ How to prove that $\{Y_t, t\in \Bbb N\}$ is an ARMA(1,1) process...
I'm looking into modelling monthly stock prices and want to start off by using data from Yahoo Finance. I know that the closing prices given there are adjusted for stock splits and dividends, but I'd like to use the given raw data and adjust it myself. For modelling purposes, should I adjust the past prices for divid...
I read the following statement in the book python for data analysis, chapter 11, and I was wondering if someone could give me intuition about why regression has this effect? The purpose of the exercise was to compare a basic correlation between microsoft and apple versus a dynamic regression. One issue with correlatio...
Assume an individual is a buyer, i.e., long, of one Forward Rate Agreement and a seller, i.e., short, of one Eurodollar Futures contract. Does the collective portfolio have positive or negative convexity? Why?
I ask because those functions are on the TI BA II Plus financial calculator. I saw some interesting answers but I don't think a calculator would be practical in their environment.
I'd like to start automating my trading strategies. I'm not looking for a fast and easy solution, therefore the programming language is not important for me, I am ready to spend an extra year to master the required technologies if needed. I'm very good with R, VBA and SQL, used Python a bit, but don't know any C++/C#/J...
I'm analyzing two financial time series with Johansen method. A high Correlation coefficient using the Pearson method will help me to detect spurious cointegration models to avoid? If this is not the case, which is the best method would provide clue about it? Thank you
I am trying to understand bond-valuation and construction of yield curve. I don't have any exposure to bootstrapping or what-so-ever as of now. So it's appreciated to have an example but not too technical (not too advanced mathematical terms - but straight forward). In Wiki shows that yield curve has three types of rat...
For a bond with market price $P_t$ and fixed payments $c_n$, I'm told the yield to maturity is given by the solution $Y$ to the equation $P_t=\sum_{n=1}^N c_n e^{-Y(t_n-t)}$. Firstly, I'm not great a rearranging such equations to not sure how to find an expression for $Y$ from here. Also could someone explain what ea...
My example is saving for college: assume a start of 0 balance deposits of 200 made monthly, every year they increase by (g) 2% to account for salary increases, first deposit made at the end of the first month Interest Rate (r) is constant at 8% (effective rate) Goes for (n=15) years What is the future value? Even tho...
My question is that when we have autocorrelation in daily volatilities can we scale daily volatility to annual basis using square-root-of-time rule? Does it breach the main assumption of the rule that says volatility is constant across period? Thank you
I am building a service similar to the BullionVault where users can buy and sell bullion. They will be placing their Buy and Sell orders on the service. Matched orders will get executed. My question is this: When there is a matching buy and sell order, where, the selling price is significantly lower than the buy order...
To implement a portfolio generator, I require a set of suitable stocks. Ideally it would use the components of the MSCI World Index and use the index weights for the probability of picking a stock (the system uses heuristics to build a robust portfolio but must be provided with random - but weighted - seed stocks). Cur...
hi question is how to price a long dated option most computationally efficiently? With European, you use Black Shoals (yes assumption constant vol/rates...etc) but it's a simple algebraic formula. With American, then what? If you use binomial tree, each step one day, with 20 days you'd have a million nodes... How do yo...
I'm trying to estimate volatility following Shreve book, so I need observations of $f(t_j,t_j+\tau_k)$ and $f(t_j+\delta,t_j+\tau_k)$, where $t_J<t_{J-1}<\dots<0$ and $\tau_k$ are relative maturities and f is inst. forward rate($\delta$ is small that $t_j+\delta<t_{j+1}$). I found this one: http://tinyurl.com/83we3db I...
I have heard that insurance companies make use of swaps and am just trying to get some clarity on that: An insurance company (assume life insurance) has a fixed obligation to pay in the distant future (policy holder's death), ie. a substantial fixed lumpsum. For that the company receives from the holder (monthly) premi...
Suppose I have a large enough set of prices of an asset, from which I can extract the following function: $f:T\to\mathcal{D}$, where $T$ is a fixed finite set of time intervals (say, 1 minute, 2 minutes, ..., $N$ minutes), and $\mathcal{D}$ is a set of finite discrete distributions of $\mathbb{R}$, such that $f(t)=D$ m...
Delta of Future is exactly one I thought. This post here, says otherwise. However, quoting John Hull again: $$f = \text{Value of Future contract} = S_{t=0} - K \exp(-rT)$$ where $S$ it the spot price, $S_{t=0}$ is the spot price today, $r$ is the risk-free rate and $T$ is the time to maturity. $$\Delta = \frac{df}{dS} ...
My bollinger band comes out like the below, which doesn't seem right. Any idea what is wrong with my code for calculating upper and lower bollinber bands? I obtained my data from here start, end = dt.datetime(1976, 1, 1), dt.datetime(2013, 12, 31) sp = web.DataReader('^GSPC','yahoo', start, end) here are my bollinger ...
Pennachi's "Asset Pricing" chapter 4 derives: $$ \frac{E[R_{i}-R_{f}]}{\sigma_{R_{i}}}=-\rho_{m_{01},R_{i}}\frac{\sigma_{m_{01}}}{E[m_{01}]} $$ Then, he states that the fact that $-1\leq \rho_{m_{01},R_{i}} \leq 1$ implies that: $$ \left | \frac{E[R_{i}-R_{f}]}{\sigma_{R_{i}}} \right | \leq \frac{\sigma_{m_{01}}}{E[m_{...
I use Rugarch for a long time in order to calibrate GARCH models on FX rates time series and perform simulations. I am trying to understand the ugarchroll method. However even if I can find plenty of examples and indications on how this method has to be used in the documentation as well as in the vignette, I still do n...
Say I want to buy historically recorded raw feed from an European exchange (say LSE). Is there a vendor that would sell me this data ? EDIT: By raw feed I mean the order by order feed (or equivalent) that would enable me to build the entire book at any point in day. Cheers
I have a Forex trading signal generator written in Node.js and now I am looking for a Forex broker with a free Node.js compatible API. The requirements are simple: be able to send new trade orders close trades get active trades The orders are the usual stop loss/take profit trades. Free API meaning, no flat fee charg...
I've been trying to access the papers that state that kind of problem, but most of them need payment for access and I am on a student budget. I know that maximizing profits=maximizing stock value in a world of certainty, but why is that maximizing stock value will be different from maximizing expected profits in a worl...
Relative value of large cap volatility. We all track the VIX as a measure of volatility, but we often forget that the VIX is volatility indicator for the large cap index within the SP500. We can construct volatility measures of volatility for different sectors/industries (tech, healthcare, financial, etc.). There is...
I'm looking into simple-to-implement and efficient order 1.5 strong SDE integration schemes for my system. My noise is diagonal and additive (possibly time-varying). Thus methods designed for either Itô or Stratonovich are fine. Are there any explicit, derivative-free, order 1.5 methods that only require a single rando...
I thought I had understood futures contract. But it seems the daily settlements betray my understanding. Futures contract provides price & product safety to involved two parties. E.g. Wheat Farmer and Baker It seems Futures contract poisitions (long, short) are credit/debit accordingly based on current market price usi...
I know that many funds have local index (i.e., SPX in US) as their benchmark. Why are investors interested in such kind of returns instead of absolute returns. From the first glance I'd think one would only care to make the maximum amount of money rather than be positive in relation to some index. I often hear how peop...
In LME website Prompt Date Structure is explained as this. Why there are prompt dates? LME trading calendar isn't universal to all other calanedars found in the market. So how do "Non-tradable dates and substitute prompt dates" affect other trading calendars? How are traders from other regions trading at their local ca...
When receiving a value date of D from the counterparty for a trade in NZD/USD, is D assumed to be date D in Auckland date D in New York date D in UTC date D in some arbitrary time zone ? There are lots of online references to market close being 7AM Auckland time for NZD/USD trades, but I cannot find any places that ...
Assume I wanted to compute the alpha (in CAPM sense, i.e. $r_i - r_f = \alpha_i + \beta_i(r_m - r_f) + \epsilon_i$) of a stock. So I take, say, monthly returns of a stock $i$ for 1 year. Subtract the riskfree rate from this and call this $Y_i$. Now I take the corresponding benchmarket return and similarly i subtract th...
I have a toy model in Excel for the growth of a investment portfolio. I assume iid lognormal annual growth factors: =EXP(mu+sigma*NORM.S.INV(RAND())) where mu and sigma are calculated to get a given mean and standard deviation right. I would really like to play around with something that has fatter tails, but with the ...
I am currently working on my thesis where I discuss the Merton default probability model. I have a huge sample of US firms for the period 1990-2010. I use both numerical and complex iterative approach to estimate asset volatility and asset value. I have a problem with the numerical approach because when I estimate ass...
I want to calculate realized/historical volatility for the underlying products of various options using the Garman-Klass estimator, but I can't see to find an equation, although I know it involves OHLC data. In the comments there is a link to the equation, but I still am looking for a little explanation. Why does this ...
What is the difference between a random process that is adapted to a filteration and one that had the martingale property. It seems the two notions are quite similar and would be helpful to construct examples when they are the same and when they differ.
Instead of deriving correlation matrix on standardized returns (z scores) would it not be more accurate to kernel smooth the cdf and then norminv the cdf values for the return z score and then calculate the correlation? I would prefer to capture long term correlation than the instantaneous correlation at infinitesimal ...
The concept of micro credit has been around for a while. Recall that Muhammad Yunus together with Grameen Bank were awarded the Nobel price in this context. I don't have references at hand but I heard that the interest rate that obligors pay for such loans are quite high (but they would pay even more at standard banks ...
I know that a lot of work has been done characterizing the first four moments of monthly hedge fund returns across a variety of fund types and strategies, and that work indicates that the higher moments are likely important. See for example Malkiel and Saha 2005. However that information alone does not suggest any par...
I'm going to participate in a game of making portfolios. The objective of the game is to make the portfolio with the bigger ROI over 16 weeks. Over each week every player can see the ROI of each player and the amount of investment instruments (equities) they used to get to that ROI over the week. Each player starts wit...
I devised a pair trading strategy going long XXX and short B*YYY. B is the quantity of shares of YYY I need to short. The problem is I can’t go short on YYY, but there is an inverse ETF for YYY called ZZZ. Assuming that ZZZ is a good replicator of shorting YYY, how should I calculate the quantities I should buy for XXX...
I am trying to build out a probability of default model for a bond. Given the current price of a bond and the current risk free rate, I am trying to calculate the probability of default. So assume a bullet bond with a 5 year maturity. Let say the coupons pay annually for simplicity and they pay out a 5% on a 100 par. ...
Given that $P(0,T)=e^{-RT}$, how does one get the formula for the instantaneous forward rate below? Specifically, how does one get to the partial derivative in the formula? I'm sure the answer is obvious but I haven't been over my calculus in a while.
Can someone explain how to get equation 27.14 below? I understand the first usage of Ito's Lemma to get $d(\ln f-\ln g)$ but I do not understand how to use Ito's Lemma to go from $d(\ln \frac{f}{g})$ to $d(\frac{f}{g})$. Can someone help to elucidate this process?
I want to find the price of Zero coupon bond given a short rate model. I think about Merton, Vasiceck, CIR, Ho & Lee models. 1) Given a simulation of $r_t$ how can I calculate $ P(t,T) = \mathbb{E}^Q\left[\left. \exp{\left(-\int_t^T r_s\, ds\right) } \right| \mathcal{F}_t \right] $ ? Using the simulations i think it wo...
I am interested in Quandl Open Data, from Quandl.com These data are also denoted as Wiki Data since it relies on users to flag errors. In particular on their website, they say: This new data source is different because it is “original”; the data is manufactured by us and Quandl users. The definitive version of the ...
What is the best way (most common) to discover if a stock is trending or not? (Despite drawing a line). A hurst exponent? A linear regression maybe?
Actually I want to add volume traded of a stock in my Garch(1,1) model to forecast the volatility.In Matlab I can specify the model as garch(1,1) and then use estimate and forecast commands.But I am not sure how to specify my volume augmented garch(1,1) model in Matlab. Any help on this would be very appreciated.
My firm is looking for an out-of-the-box database system to store and query high-frequency tick data. What are the best options? It seems that kdb+ is the market leader in this field.
Non-maturing deposits (NMD) is a deposit without maturity date. The deposit rate is normally low. Banks could adjust the rate at any time. The customer can withdraw without penalty, however, in real life, the deposit is observed to be "sticky" when LIBOR rate changes. Now, how shall such NMD amount be modeled for Fund ...
Recently I've tried SciChart and VisiBlox - beautiful charting tools. Are there any free or open-source tools for visualizing charts in C#? Thank you for answers.
I'm about to embark on training a neural network on daily forex data, with a view to obtaining a predictive network. I'm also interested in using data other than the forex currency pair data itself, in a manner similar to intermarket analysis. What other time series data does the panel think will provide meaningful inp...
For a particular stock, what's the simplest way to calculate betas for the Fama-French factors SMB and HML?
I would like to know which formula to use in order to optimize a portfolio based on highest Treynor and Jensens Alpha. I am aware that usually one optimize a portfolio by highest Sharpe ratio (the tangency portfolio) by following formula: $$\textbf{w}_{tan} = \frac{1}{(\boldsymbol{\mu}^e)^\top\boldsymbol{\Sigma}^{-1}\t...
When doing the PCA analysis, you end up with eigenvalues which are ordered by how much variance they explained for each eigenvector. Say, the eigenvectors since they are orthogonal, do not represent the reality - I want to stick with the original factors only, but determine which are the most important and which add up...
Does anyone know where I can find a list of all stocks traded on the NYSE in a table that also includes what sector they are in? I want to look at some data using info both from the individual stock and from the sector but I cannot find a comprehensive list containing both pieces of information.
Is there a way to retrieve the implied correlation between stock price and zero coupon bonds?