instruction
stringlengths
35
27.7k
I am using the KPSS test to check stationarity of a financial time series. I would like to know if there is another test to confirm the stationarity. Any advice?
Which is best? Or is it irrelevant? Hi! Considering Level 2 Data (Market Depth), I want to understand the advantages to have all the order book on an order-by-order basis (or tick-by-tick basis) versus only have a total aggregated volume by price levels? Who are the principal users/traders of each method? Can you give...
If we know the dynamics of $S$, then we can estimate the value of $S$ at a time point, $t$. Here, I have a question concerning how to solve for $S_t$ by Itô because I obtained different results by different approaches. For a geometric Brownian motion: $$dS_t=S_t μ dt+S_t σdW_t,$$ $$\frac{dS_t}{S_t} =μ dt+σdW_t,$$ and, ...
I want to calculate company-level market cap values for stock exchanges listed by Bloomberg. I gather this can be calculated as the product of share price and the total of shares in circulation. But this approach does not seem to add up: for example the London Stock Exchange's data on FTSE100 members (see their 'List...
This is to some extent a theoretical question and maybe we can work together to produce some input and output. Diverse option pricing models are reported to be misspecified in various studies. One example is the paper of Baksi et. al (1997) called "Empirical performance of alternative option pricing models". The autho...
Everything I have read about XIRR (e.g., as calculated in Excel) says that there is no closed-form equation and it must be calculated by iterated approximation. Could someone give a brief mathematical explanation of why there is no closed-form solution?
I am trying to convert various series of returns into one currency (euro). I saw from aprevious post that soemone suggested using conversion factors, where would I find these? Also, given that the euro only goes back so far is there anyway to get a proxy for historic Eurozone returns? No, can access the fx data - I sup...
I'd like to estimate from a daily prices serie $P_t$ with $N$ observations a quantity such as the variance of the weekly returns. I will use $\ln\left(\frac{P_{T+5}}{P_T}\right)$ assuming 5 days in a week for a weekly return. The good method (or so it seems) would be to use non-overlapping data, that is to say I will e...
I'm building an model on different loans' NPL rate. The problem is NPL rates are always affected by the market. When NPL rates move in trend, my model will fail the back-testing. Assuming $x(t)$ is a random variable that distributed among $[-1, 1]$, with the mean $\mu = 0$ and a standard deviation $\sigma$. When the sa...
This is a question about why options prices do not take volume into account. The popular option valuation formula "black-scholes" certainly does not account for this and I don't suggest that it does. But one could hold a large option position while the underlying asset's price walks up or down on very low volume, allow...
I have seen the following formula for the tangency portfolio in Markowitz portfolio theory but couldn't find a reference for derivation, and failed to derive myself. If expected excess returns of $N$ securities is the vector $\mu$ and the covariance of returns is $\Sigma$, then the tangent portfolio (maximum Sharpe Rat...
In backtesting (nasdaq stocks), I make the assumption that I have the ability buy/sell each day at the opening and closing prices. Is this realistic?
Does anyone know if the Fama-French three factor model has been re-examined empirically after 1993, when the original paper was first published? I am asking because there seems to be considerable debate about whether the SMB and HML factors represent true risk-factors. It seems to me the best test is to see whether th...
Hypothetical Trade: I buy 10,000 shares of ASTC using a broker API. The order is filled in 4 similar lots; 2500 shares at 0.80 2500 shares at 0.80 2500 shares at 0.77 2500 shares at 0.77 The easiest way to record these lot fills is if the broker issues a UNIQUE "Lot ID" like this: 2500 shares at 0.80 --- LOT ID# 3484H...
What is the real value of a single share of company stock? Let's ignore the "the value is what someone is willing to pay for it" angle. At some point, there has to be a real inherent value to company stock for it to be worth someone paying money for it. Stocks that pay dividends have an obvious value, but not all sto...
I need to get the IMM dates in excel. IMM dates are defined as the third Wednesday of every March/June/September/December.
I was estimating a long-run relationship of exchange rate and purchasing power parity. The residual of the long-run relation which should be $I(0)$, but it is only $I(0)$ when I introduce trend in the long-run relationship. Can someone provide the logic or study material that shows introducing trend is not a problem a...
In the Vasicek interest-rate model, the interest rate reverts to a constant mean. This makes sense to me. In my conception, the mean ought to be time-invariant, since interest rates don't follow an increasing or decreasing trend in the long term. In the Hull-White modified model, the mean is a time-dependent function...
I know that the relative risk aversion is defined as $$R(c) = cA(c)=\frac{-cu''(c)}{u'(c)}$$ where $u(c)$ denotes the utility curve as a function of wealth $c$. But I do not understand the intuition for it. Can you explain the intuition for relative risk aversion?
Is the modified duration of an overnight index swap zero or close to zero?
Let a linear time-varying mode like this one: $y_{t}=\alpha_{t}+\beta_{t}x_{t}+\epsilon_{t}$. You can also suppress the constant term to simplify this example: $y_{t}=\beta_{t}x_{t}+\epsilon_{t}$. Kalman filter allows you to get $\beta_{t}$ value under some hypothesis which there's no need to list here. Knowing that, e...
Assume that we have current month term curve and the curves from the two previous months. The current curve may be shifted from the average of the previous two curve by some value (a parallel shift). The task is to identify outliers on the current curve and if they exist than smooth (interpolate) the outlying points. I...
Do fewer transaction costs and higher liquidity relate to lower market prices? Are there any good resources that deal with these topics in more detail?
What is the best method for calculating VaR/CVaR for private equity, hedge fund, and alternative investment portfolios? I have only historical monthly return for them.
when trying to implement the Black-Scholes formula in Delphi, I've found this: http://www.espenhaug.com/black_scholes.html I've checked the results against option-price.com and found they are different. Can anyone share the code for the B&S formula in Delphi/FreePascal (from a different source than espenhaug.com?. {Bla...
It can be argued that the leverage - reflected by how much collateral people or firms need to put down to borrow and might lose if they fail to pay the loan back - used in the financial system is one of the quantities that proved to be fatal for the unfolding of the recent financial crises: http://www.bloomberg.com/new...
Let X and Y be two GBM’s, they have each a univariate log-normal distribution for some time t, that is $X_t\sim{LnN(µ_x, σ^2_x)}$, $Y_t\sim{LnN(µ_y, σ^2_y})$ and $Z_t=[X_t,Y_t]\sim{ MvLnN(μ, Σ)}$ where $µ_x, σ^2_x, µ_y, σ^2_y , Σ$ have the known expressions as functions of time and initial values.. We take the value ...
I'm developing a trading strategy which takes into account certain parameters (e.g. avg spread, weighted price, etc). Of course, these parameters can be calculated over different window types (i.e. last X minutes/ticks/trades) and sizes. Obviously, there's no optimal window to be used in every instance, but I would app...
I have the following C# code for calculating the modified duration of fixed coupon bonds: public Double duration(Bond bond, DateTime dtSettle) { double duration = 0.0; double timeDiff1; double timeDiff2; double ytm = YTM(bond,bond.marketPrice,dtSettle); double impPrice = ...
As the title suggests why is the indifference equations in mean variance portfolio theory convex shaped? Indifference Equation: https://en.wikipedia.org/wiki/Indifference_curve A graph:
I am trying to estimate the early exercise boundary for an American put option. I can find the put value through the Longstaff-Schwartz LSM method. How do I obtain the early exercise boundary within the same LSM framework?
Consider a classical Black Scholes model , $$\frac{dS}{S} = \mu dt + \sigma dW$$ , where $dW$ is a Brownian motion, that $W(t_1) - W(t_0) \sim N(0, t_1 - t_0)$. The back-testing strategy is straight-forward: Once $\mu$ and $\sigma$ is recognized from the samples, $ dS / S_t \sim N(\mu \cdot dt, \sigma^2 dt)$. So back-t...
I want to predict expected returns for assets using a CAPM, to calculate unexpected (unpredictable, idiosyncratic, non-systemic) returns in portfolios. My CAPM estimated on monthly total gross returns obviously have some outliers. Instead of throwing out the outlier months, I think I need to ignore entire assets with o...
Imagine you have two volatilities, the second which is "activated" when the stock crosses a barrier called $p_b$. The present price is $p_1$. ($p_b>p_1$). This can be used to price options after a crash when it's assumed that options are more expensive in the short term and are reverting over the long term. There is a...
Could someone please help me with trying to get the Ox interface to work in R. I followed the steps outlined in this paper (http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1752095), but I get the following errors as output: Ox Console version 6.21 (Windows/U) (C) J.A. Doornik, 1994-2011 This version may be used for ...
Is there a method of finding a risk-neutral measure for assets driven by the levy process? I understand there is the esscher transform but I think it tends to transform the processes into unrecognisable/intractable forms. Can anyone provide an explicit method to finding a risk-neutral measure?
Is there someway to get the historic market capitalization/outstanding shares of stocks traded in US exchanges ?
I come from a programming background and not am no quant by career so this is probably a newbie question for you guys. I have written some code to pull daily closing values for market indices (DOW/NASDAQ etc.) along with closing account balances from a stock broker's API. See screenshot So I have a date column, closin...
I am trying to find market-structure research on how the size / depth of the order book changes during the day for equities. I would expect it to get deeper and deeper and bigger and bigger continously as the day progresses, but I don't have access to order book data to validate this. Can someone here provide any insig...
I would like to simulate an equity index, a risk free cash account and the yield curve for the purposes of valuing a guarantee on an insurance product that is being backed by both equities and cash. What is the industry standard model for an option that depends on the payoff of many asset classes - such as equities an...
We try to analyze the average correlation of a portfolio as it can be found here in section 2 b), the same formula which is also used by the CBOE to calculate implied correlations: $$ \rho_{av(2)} = \frac{\sigma^2 - \sum_{i=1}^N w_i^2\sigma_i^2}{2 \sum_{i=1}^N \sum_{j>i}^N w_i w_j \sigma_i \sigma_j} $$ EDIT:Assuming t...
Basically, the question is in the title. For some similar data: EDHEC provides some data and one can also get the Mutual Funds data from the Yahoo Finance:is there anything else out there? Thanks,
I am trying to help a friend with her thesis on Counterparty Credit Risk where she intends to have a somewhat lengthy treatment on Credit Valuation Adjustment (CVA). Specifically I am looking to help her in including some computer simulated experiments which would hopefully illustrate CVA calculations under simulated s...
I am attempting to run a rolling multivariate regression (14 explanatory variables) across a panel of 5000 stocks: For each of the 5000 stocks, I run 284 regressions (by rolling over my sample period). In summary: 1,420,000 regressions in total are ran for the panel. To achieve this, I make use a nested "for loop": l...
I am trying to estimate a FIGARCH(1,1) model in R for Value-at-Risk purposes. As I understand it, the rugarch package does not support FIGARCH or FIEGARCH. To that end, I used the garchOxFit function (which runs the estimation in Ox, whilst interfacing with R). It all works and I am left with the the fitted conditiona...
This 2004 McKinsey Quarterly article reports that, back in 1999, three-quarters of CFOs always or almost always use[d] IRR when evaluating capital projects. The same article warns against the pitfalls of the internal rate of return (IRR). Although using the latter makes sense if the project only consists of an initia...
What is meant by a structural short in this context: "First lesson: Valuation shorts are pretty difficult. Look for structural shorts instead." Link
In the Black (1976) model: We should use the settlement prices of the underlying futures contract in order to estimate the volatility, right? Or can we also use the spot prices? Because the behaviors of these series of prices are quite different. Should the volatility always be annualized?
In the electricity sector, what should be the shape of the volatility smile? a behavior similar to other commodities with a convex curve, decreasing first and then growing to the initial level. or a volatility skew with volatilities elevated for higher strike prices ??
I am interested in calibrating a Hull-White model to the market. I do not, however, have data on anything except the market zero curves, as all derivatives are being traded OTC. My plan is to calibrate the model to the zero curve. Will this produce a sensible calibration of the model in respect of derivatives? If not...
I have constructed a simple HMM (Hidden Markov Model) with 2 states on the Vol (stdev) of a time series of currency returns. The state vector I produce looks reasonable, in the sense that it appears to have identified periods of high or low vol. However, I appear to be able to generate a very similar state vector just ...
Could anyone point me to detailed literature about "Partial Least Squares Discriminant Analysis"? Intuition, methodology and examples.. Thanks,
Is there any other historical end-of-day CME option data provider rather then CME DataMine? I've searched all the internet and found only CBOE traded options.
What is the correct methodology to compute constant maturity futures price. I've met in some papers that do the following. To create constant maturity synthetic futures prices with maturity $m = 30, 60,...,180$ days. We should take a pair of futures that straddle the chosen maturity $m$ with maturities $s<m<l$ measured...
Let's assume the usual state-space linear model without constant term for simplicity: $y_{t}=\beta_{t} X_{t}+\epsilon_{t}$ If we apply Gaussian Kalman filter to estimate $\beta_{t}$ we get $P_{t}$, which is the covariance matrices of predicted states, and $v_{t}$, which is the prediction error. The following simple R c...
Forgive me I am not good at economics, I have following values. amount I want to lend. the current bank interest rate. the amount of years the loan will be for Please tell me the formula to calculate how much interest only amount that I will have to pay back over the life of the loan.
If you look at instrument name for listed on various futures exchange you often see Gold Only1214 Gold Full1214 What is "Full" and "Only" mean? The price listed is the same and I cannot find a reference to this convention anywhere? (Please and Thank you.)
I'm interested in testing my trading strategy using the Interactive Brokers API for Trader Workstation. A demo account is provided to play with TWS for free, but if I fund a real account I will be provided with a paper trading account to use. I believe that the demo account uses simulated or old market data, whereas a...
In terms of Merton credit risk model need to find the initial value of counterparty's assets and the volatility of the assets. Both value are not directly observable thus we have to approximate them by solving the system of equations, one of which is $$ \sigma_E E_0 = N(d_1) \sigma_V V_0 $$ I found the derivation of th...
What is the industry consensus (if it exists) about implied volatility calculation for options on VSTOXX (OVS)? I've experimented with the following approach: Standard Black-Scholes VSTOXX futures as underlying prices for respective option maturities Assuming $q=r$ and I wasn't quite happy with the difference between...
I am currently testing whether three proprietary factors - Valuation, Size and Momentum - explain cross-sectional returns. A sample of 3000 securities was tested using Fama-MacBeth two-pass regressions over the period 1988-2013. In order to mitigate any thorny estimation problems due to time-varying regression slopes,...
Consider a log-normal model, $dx / x = \mu dt + \sigma dW$, where $W(t)$ is a Wiener process. Let's say $\mu$ and $\sigma$ change with time, slowly, so we note them by $\mu(t)$ and $\sigma(t)$. Consider $dx / x$, where the drift rate is $\mu$, and the volatility is $\sigma \sqrt{dt}$. Here, $\mu(t)$ and $\sigma(t)$ is ...
I am having a problem understanding discounted cash flows. I appreciate your patience and help. Lets say I have a bond that I want to price. Par: $1000 Coupon Rate: %5.0 YTM: %5.0 Frequency: Semi-Annual – 2 (Paid on: 6/30/20XX,12/31/20XX) Settlement Date: 8/15/2013 Maturity Date: 12/31/2014 12/31/2013 6/30/2014 12...
Does the Black (1976) model require the existence of the relation $F(t,T)=S(t)e^{r(T−t)}$? I studied the derivation of the Black-Scholes formula. However, although I know the Black formula, I've never studied its entire derivation process. And probably the easiest way to justify the formula is using that relationship (...
Why is that the covariance of a global minimum variance (GMV) portfolio in the efficient frontier with any asset is always the same?
Assume I have a large portfolio of equities spread across three sectors. I am attempting to compute the volatility of these sectors within the portfolio considering the cross correlations among the assets in the other sectors. Further, how might I compute the relevant cross correlations for use in the volatility measur...
This is a basic question. I have three assets, equally weighted, and all the mutual covariances are -1. Then, the covariance matrix looks like - 1 -1 -1 -1 1 -1 -1 -1 1 Now, to calculate the VaR, I need to calculate the portfolio variance. Am I correct in concluding that I can't calculate the portfolio varia...
To price the convertible bond, one of the models is the bond plus equity option method. That is, the value of convertible bonds is evaluated by finding the value of the straight bond and the value of call option on the underlying asset by option pricing model, i.e. Black Scholes Model. Another model is the binomial mod...
Is there any good research on the price elasticity of trading in financial markets? Things like optimal fee structures and the like?
I am looking on literature and models on pricing a bond futures' calendar spread. assuming the basket of deliverable bonds is the same and the ctd is the same, what are the factores determining the price of the spread? Thanks
It looks like the subject of seagull option strategy is not as clearly explained as for other strategies (butterly, bull,bear spread). Thus, can someone provide a clear example of what you buy and sell in this strategy? Also, could you please indicate the ralationship between the strikes of each option that is involved...
Let's suppose we have a futures contract F in a market where the relation $$F(t,T)=S(t)e^{r(T−t)}$$ doesn't hold. What are the the boundary conditions for the derivation of the Black (1976) formula??
I am looking to take a cross sector subset of a larger stock index universe. What steps to I take to assure that sector representation is as equal as possible to help smooth out my variance(while admittedly giving away some return). Thanks.
I am calculating implied interest rates using covered interest rate parity theorem. I am looking at the Australian US currency pair. When evaluating day counts, should I be using Actual/365 for Australia and Actual/360 for US?
I am after a good comprehensive resource on Japanese day count conventions. By that I mean, is actual/360 or actual/365 used for pricing various options, forwards, futures, etc.
When using Reuters, for each listed company there is credit tab that shows relevant information in terms of credit default. There is also rating class as well as one year default probability. It is said they use a structural model - does anyone knows what structural model do they use?
Consider the RQuantLib package function FloatingRateBond(). This takes as inputs gearings and spreads, whose correct definition is unknown to me. Let I have a floating rate bond, e.g. the BACRED Float 06/18/20 (whose ISIN code is IT0004921646): this bond pays annually EURIBOR 3M + $140$ bps. What gearings and spreads o...
I'm looking to optimize a portfolio maximizing expected return for a particular risk budget, but with absolute constraints on the individual instrument positions. I've been experimenting with QP, but I was wondering if anyone could guide me to a suitable solution?
More specifically, I am looking for recent research papers that have harnessed Mandelbrot's ideas too successfully predict asset prices. I have read many papers about wavelets, and I would like to read what other people (you) consider to be the best work in this field. Are wavelets the only analyses currently in devel...
Is it true that pricing a reinsurance contact is equivalent to pricing an option. Basically a reinsurance just cuts off the risk exposure of the insured institution to a threshold say $K$. So if we assume that the prospective losses of the risky portfolio of the institution can be modelled by a random variable X, then ...
This paper describes an algorithm for computing arbitrage opportunites using a gauge connetion. Has anyone written a python program or C++ or C# program that shows how to follow the steps outlines in the paper, and if so, could you point me to it?
Are there any sure-fire ways to increase market-depth that people have experience with? Has much research been done/published on this subject?
I observe a sample from a distribution that I expect to be the hitting time $$\tau = \inf\{t>0| X(t)>a\}$$ where $X(t)$ is a Lévy process with $X(0)=0$ and $a$ is some constant. $X$ is not a Brownian motion and the experimental fit to the Lévy distribution is poor. However, I do not need to know the exact formula for...
I'm trying to understand how to compute the daily volumes of the Dow Jones Industrial Average but I haven't found the proper formula yet. I thought it was the sum of the price*volume of each constituent but the result doesn't match. For example, on 2012-08-23 the last prices and volumes were: Company | V...
Want to have electronic access to equity options quotes in real-time. Is there anyone offering this service to the individual investor for a reasonable price? Again it must be electronic, in other words, a computer program will analyse the data in real time, not the human eye.
DB has some sample Level 2 market data: http://deutsche-boerse.com/mda/dispatch/en/listcontent/gdb_navigation/mda/200_market_data/650_historical_market_data/35_enbs_hist_data_xetra/EnBS_historical_data_Xetra.htm In particular: http://deutsche-boerse.com/mda/dispatch/en/listcontent/gdb_content_pool/imported_files/public...
When dealing with trade data, for example from TAQ, a common problem is that of determining whether a trade was a buy or a sell. The most commonly used classifier is the Lee-Ready algorithm (Inferring trade direction from intraday data, 1991). Unfortunately, this method is known to be inaccurate: Lee and Radhakrishna (...
Can anyone point me to the expression for the first passage time for a geometric Brownian motion process X(t) as a function of the starting point, threshold, drift and diffusion parameters. I am mainly interested for processes with positive drift and thresholds that are higher than the starting point. I know this is a ...
Excel is likely the most widespread instrument across all not-only-quants desks; in addition, we have to keep in mind that Bloomberg and Reuters allow to easily import real time data in Excel, and this is very handy. Due to these features, I'm wondering what's the easiest and most reliable solution to use QuantLib in E...
I have a question about a option theta. When I evaluate the option theta of near expiry put option using Black-Scholes formula given the data as follow: Index Level = 20,500 Strike Price = 20,000 Interest Rate = 0.14% Dividend Yield = 3.41% Volatility = 23.64% Time to maturity = 0.01 (2 days) Using data as above, the...
I have a quick question about the ETF Roll Yield. As we all know commodity ETF’s have struggled with contango (spot price is below futures prices on the term structure). Look at an ETF like USO which because of the contango in WTI has had negative roll yield even as WTI prices have rebounded since 2008. Here is my ques...
I'm using QuantLibXL to build a discount curve, a zero yield curve and a forward curve of the EURIBOR rate (QuantLibXL is downloadable here). I've built an object of class PiecewiseYieldCurve through the qlPiecewiseYieldCurve() function and the TraitsID argument is set to ZeroRate. When I use the qlPiecewiseYieldCurveD...
I think there are two possible ways: 1. day open, close, high, low, volume separately into array, then I have 5 arrays to work with my calculation 2. Put all of these into one array or linklist to do the calculation. I think the 1. would be more easy to handle all backtest calculations, do you agree? Background informa...
I have a fairly simple problem for an application I am writing currently. How do you calculate the options probability of being in the money or touching a certain strike price. I know there are at least two ways of doing it. One would be to derive it from the options pricing and the Black Scholes formula, but the other...
I have several assets, each with different return histories. Some of the assets have 75 days of return history, others have 40 or so days. In calculating a robust covariance matrix, should I be using a resampling with replacement technique or should I be using an expectation maximization algorithm? I was thinking of tr...
The following link contains a file containing CME Level 2 FIX Market/Orderbook data for Corn futures: ftp://ftp.cmegroup.com/datamine_sample_data/md/mdff_cbt_20130714-20130715_7813_0.zip However, after going through the file the timestamps at tag 52 are all over the place and in no order. Would somebody familiar with F...
I have two questions to ask: What are the best methods to determine stationarity in a financial market (such as stocks) using MATLAB? What methods would you recommend to use in order to change from non-stationary points to stationary points (so as to better predict the market), so that I can use the resulted data for ...
A rights issue is the granting by a corporation to its shareholders of a right to purchase $N$ new shares for each $M$ shares they already hold at a (often discounted) price $K$. Thus, it superficially resembles a call option, but because every shareholder is holding such options, dilution of the stock value is unavoid...
Searching online, i found out that non-stationary cannot be analyzed with traditional econometric techniques as in case of non-stationarity some basic model assupmtions are not met and correct reasoning on relationships between non-stationary time-series is impossible. Is there anyone who can enlighten me what are the ...
I'm currently looking to implement some version of the yield curve modeling techniques in the maximum smoothness framework. The papers I have found so far explains the theory pretty well, but I find them somewhat hard to replicate. Does anyone here know any easy-to-replicate papers on the topic? The ones I have read so...