Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [finance]

The science that describes the management, creation and study of money, banking, credit, investments, assets and liabilities.

Filter by
Sorted by
Tagged with
1
vote
0answers
38 views

Unit root test with a dummy for an event

I'm currently working with financial time series that experience a crash towards the middle of the series. These series are returns. From the graph, these series clearly look stationary. However, due ...
1
vote
1answer
40 views

Sample from aggregate portfolio distribution versus individual asset distributions

Suppose I have three assets $x_1,x_2,x_3$ in a portfolio with weights $W=\begin{bmatrix} w_1 \\ w_2 \\ w_3 \end{bmatrix} $, expected returns $R=\begin{bmatrix} \mu_1 \\ \mu_2 \\ \mu_3 \end{bmatrix}$, ...
0
votes
0answers
126 views

Test for confounding variable S&P 500 Python

I'm looking into a possible topic for a school project currently. It involves looking at the S&P 500 in comparison to other indices globally (e.g., Nikkei, DAX, etc.). I currently have plotted 19 ...
1
vote
1answer
155 views

Lag between forecast and actual value without lagged dependent variable as features

I'm trying to predict a time series using a model-tree (Cubist) and I'm getting a strange behavior, I think. This is a stock market data but I'm not using the raw level of the stock price but change ...
3
votes
0answers
161 views

Noise in ARIMA Model In-Sample Predictions

I am working on fitting some financial data into an ARIMA model to give me a forecast of the next time period. I am using pyramid's auto_arima function to get a ...
0
votes
0answers
26 views

How to measure statistical significance of a non-binary-position trading strategy for an irregular time series?

What are the different ways to identify/measure whether a trade strategy is statistically significant? Specifically I have an irregular time series of individual trades between: other buyers and ...
0
votes
1answer
111 views

Algorithm to find the attributes that comprise the greatest concentration

I have a porfolio of mortgage loans where each loan has a number of attributes attr1, attr2, .., attrN. I would like to analyze the portfolio credit risk concentration (see below) using these ...
3
votes
1answer
343 views

How to minimize sharpe ratio with LSTM recurrent neural network?

I've read some articles about trading using recurrent reinforcement learning such as this one. The point where I do not fully understand is how to construct the cost/loss function. In the article, ...
1
vote
0answers
13 views

Testing for difference in means for utility of wealth

Assume you have 2 different investment strategies, A and B. You simulate how A and B perform on the same $N$ time series of returns and compute the resulting utility of wealth. $N$ is large, say ...
0
votes
0answers
55 views

Machine learning techniques to evaluate hedge funds

I have a data set which consists of > 500 hedge funds, their historical monthly returns, and their benchmark (index) monthly returns. The number of data points (# of monthly returns) differs from a ...
0
votes
1answer
34 views

Measuring correlation between random variables when they are not normally distributed?

I want to perform some analysis on portfolio that consists of stocks. In particular, I want to know the relationship between the stocks during the downmarket. The problem complicating this analysis ...
0
votes
1answer
127 views

Is Reinforcement Learning suitable for optimal control problems in which actions influence rewards but not states?

In particular, rewards $r = f(s, a, s')$, but states are independent of actions $s' = g(s)$. A example could be asset trading that actions (long, short, hold) of a small trader won't affect market ...
1
vote
0answers
131 views

ARMA-GARCH model with t-distributed errors

I've estimated an ARMA(1,2)-GARCH(1,1) model fitted on financial data. It is very satisfactory in modeling the autocorrelation and the volatility in my data, however, the qq-plot empirical quantiles ...
1
vote
0answers
218 views

Machine Learning on Extremely Low Signal Data

I have terabytes of data with an extremely low signal to noise ratio, with the following characteristics: The relationship between the features and the response variable can change over time I'm ...
3
votes
1answer
74 views

Parameters in Autoregressive representation of an ARCH model

Suppose we have a $0$ mean time serie representing stock index returns about a title, $r$. I also know it follows an $ARCH(p)$ model with parameters $\omega$ and $\alpha$, specified in the following ...
1
vote
0answers
25 views

What are good ways to visualize budget/financial controlling data?

What are useful visualizations of budget/forecast vs actual spending data, i.e. data consisting of hierarchically structured sums compared at various (2-4) points in time? The aim would be to make ...
2
votes
1answer
138 views

Impact of window size on estimated volatility using SMA or EWMA

When calculating volatility (either using an SMA or EWMA approach), what impact does the window size have on the volatility estimate?
0
votes
0answers
39 views

Linear regression in R: testing statistical significance with t-tests

I am trying to test the statistical significance of the alphas in my trading strategy. However, I do not understand the difference between the alphas generated in R. To test the statistical ...
0
votes
0answers
36 views

Constrained optimization - quantitative finance

I am trying to perform constrained opmitization for portfolio performance attribution analysis. Specifically, I am trying to determine the impact of sectors performance on the S&P 500 index. Min ...
0
votes
0answers
33 views

Computing expected loss

I have three options like $A_{1}\leq A_{2}\leq A_{3}$. If I choose the higher value $A_{3}$ , I have more risk to loose. Let me make it clear , if I choose first the expected loss will be 1 , for the ...
2
votes
0answers
54 views

Why financial time series have perfect multicollinearity?

I have daily financial time series of stock returns (35 stocks) which I took the natural logarithm and subtracted the risk-free rate. However, I get the issue non-invertibility of the covariance ...
1
vote
3answers
54 views

Trying to run a regression on three variables that impact equity returns

I have three variables a,b and c, which impact equity returns, y. a is based on financial statements, so it is a quarterly figure. b and c are calculated daily, and so are daily (only on trading ...
1
vote
2answers
194 views

Nonlinear regressor in GLM link function

Try to reproduce Robert E. McCulloch and Ruey S. Tsay’s paper Nonlinearity in High-Frequency Financial Data and Hierarchical Models with local market data. the paper uses GLM to model high-frequency ...
1
vote
0answers
169 views

EWMA using Monte-Carlo simulation

Im trying to forecast volatility using an EWMA model in python. Where i have return(t-1) and variance(t-1). n is number of days. for every Monte-carlo simulation N: t=1: Forecast the variance using: ...
1
vote
1answer
33 views

Need handy formula for $\text{Cov}[\max(V_1-K_1,0), \max(V_2-K_2, 0)]$

In a recent post, I asked for help deriving a computable formula for $\text{Var}[\max(V-K,0)]$ based on the approach on p. 262 of ths book. $V$ is a lognormally distributed random variable and $K$ is ...
0
votes
0answers
21 views

What machine learning methods for estimating return, risk contributions of sectors to market?

I want to know analytical machine learning methods (the more innovative, the better!) to calculate contributions of sectors (ex. financials, consumer staples, industirals indices) to the market (ex. s&...
4
votes
2answers
121 views

Need handy formula for $Var[\max(V, K)]$

In Appendix 12A, p. 262 of this book, the author Hull derives a handy, tractable formula for the expression $E[\max(V-K, 0)]$, where $V$ is a lognormally distributed random variable and $K$ is a ...
1
vote
0answers
26 views

Is this short rate really constant?

Suppose that a financial instrument has a constant short-term rate $r$ and its price $S$ is driven by the equation $$S_t = \mu_t S_t \, {\rm d}t,$$ where $(\mu_t$) is a process adapted to the ...
2
votes
2answers
89 views

Why does the maximum probability of profiting occur when std. deviations of two different stock prices are equal?

I am working through the "Math for Quantitative Finance" course on brilliant.org. The following question was given as an example: An investor wishes to invest $700. There are two independent ...
2
votes
0answers
105 views

Percentage of total variation explained in a VAR model

I was studying Campbell, Chen, Viceira (2003) https://dash.harvard.edu/bitstream/handle/1/3163263/campbellnber_assetallocation.pdf?sequence=2 I cannot really understand how they decompose the ...
1
vote
0answers
57 views

Predictive regression on Fama/French

I have to predict (monthly) returns on Stock Indices (S&P 500) with the FF-Model (3 and 5 Factors). Therefore I shall use a predictive regression and an in-sample analysis. I started off with a (...
1
vote
0answers
9 views

Index creation for studying “average” time series properties

I have 300+ financial time series from an "unknown" asset class. To study the dynamic properties of class my idea was to collect them under an "index" and then study it as an univariate time series. ...
0
votes
1answer
27 views

Average for year if some stores stop selling product

I am trying to calculate yearly sales averages per product across a number of stores. The average should only include those stores which carry a product. So if I have stores A, B, and C and products ...
19
votes
3answers
557 views

How to tell if girlfriend can tell the future (i.e. predict stocks)?

My girlfriend has recently gotten a job doing sales and trading at a major bank. Buoyed by her new job, she believes she can predict whether stocks will be up or down at the end of the month greater ...
1
vote
1answer
84 views

Deal with noise data

The following picture represents a graph with price over time. I am a mathematical student, but also a trader. I want to create a function which could localize the good entry and exit points for sale ...
3
votes
0answers
542 views

Medium Frequency Trading - Better labelling strategy?

The mid-price at time $t$ is denoted by $$p_t = \frac{s_t^{a,1} + s_t^{b,1}}{2}.$$ This mid-price can evolve in minimum increments of half a tick but is almost always observed to move at ...
0
votes
2answers
542 views

Are S&P 500 monthly (or annual) returns a random walk?

I'm using financial software that assumes that yearly market returns are random and independent in their Monte Carlo analysis. Its not clear to me that this is the case. Is there an easy way for a "...
1
vote
0answers
55 views

How to decide on the best in-sample period to forecast out-of-sample?

I have to generate an out-of-sample forecast for an assignment at university. The question asks that I select an in-sample period, from 2008-2017, for the returns on my portfolio. I am curious as to ...
1
vote
0answers
33 views

Annualized standard deviation and Sharpe ratio

Say I have a trading strategy that has given n trades over a period of t trading days. To compute the annual profit I will do something like CAGR = prod(profits+1)^(1/(t/252)) Then I will subtract ...
1
vote
1answer
302 views

Why is a return process assumed to be stationary when there is volatility clustering present?

I am analysing a logarithmic returns series only to find the ADF result to signify the stationarity of the series. I understand that this is a way of differencing the original price series, however I ...
3
votes
0answers
102 views

Can non-parametric tests, e.g. Mann-Whitney U, be used on non-normally distributed statistics off of bootstrap samples?

I have some return data from some different portfolios which I would like to compare using risk vs return ratios. The standard Sharpe ratio has a nice solution for calculating the significance of the ...
0
votes
1answer
55 views

Variance of $\frac{t}{T}X+Y$

I would like to understand how variance of multiple random variables is computed when weights of the variables changes over time. For example, let $\displaystyle X_{t}$ be a random variable at time $\...
0
votes
1answer
54 views

Calculating Variance of a random variable with time dependence

I am currently trying to undertstand the concept of Value at Risk, which attempts to calculate the a value such that the potential loss on a portfolio is bounded by a number with 99% probability. The ...
0
votes
1answer
273 views

Generating and interpreting betas for credit spreads

My goal is to model individual credits spreads against a "benchmark" credit spread in order to generate a beta that is the fixed-income equivalent of the market beta used in capital asset pricing ...
0
votes
1answer
38 views

Has anyone used Machine Learning Techniques for estimating CAPM?

I tried to find papers working out different estimators for CAPM beta or 3 or 4 factor model but couldn‘t find any. Do you know if anyone has used machine learning techniques like xgboost or neural ...
1
vote
0answers
43 views

Continous vs categorical predictions

I have been thinking about this recently. I want to predict tomorrows price for a certain stock, lets say apple. For this I can use many different models; regression analysis, random forest, RNN... ...
2
votes
0answers
205 views

Random Forest for financial networks modelling

One of the hottest topics in today econometrics is financial networks models where researches use vector autoregressive (VAR) models applied to time series of daily volatility measurements of ...
0
votes
1answer
35 views

Annualized Excess Return [closed]

I have been given the following formula to calculated Annualized excess return: Annualized excess return = (1+Monthly excess return)^12-1 The answer is provided ...
0
votes
0answers
841 views

OLS regression using the CAPM model in python

I've checked several posts here and haven't found what I'm looking for... The goal is to do a CAPM regression and assume that you have the following information: monthly prices for company AAPL, S&...
1
vote
0answers
32 views

What's the best model for a history of time-stamped events vs. a binary response?

I have three tables: A list of client ids For those clients, 3 years of time-stamped inclusions/exclusions in a credit bureau blacklist For those clients, 1 year of time-stamped negotiations with the ...