# Questions tagged [time-series]

A temporal sequence of events measured at discrete points in time.

588 questions
Filter by
Sorted by
Tagged with
49 views

### Converting time bars to tick bars or volume bars in python

Recently I've started reading Advances in Financial Machine Learning by Marcos Lopez de Prado. In the second chapter the author defines some essencial financial data structures, like tick bars, volume ...
9 views

### Sampling and cross-validating with tick, volume and dollar bars

Financial data is usually structured with time bars. Other sampling techniques include: tick bars volume bars dollar bars. These are so-called sampling techniques to better identify signals and ...
46 views

### How to use multi-periods and mult-factors to predict stock price by linear regression?

Give data in $t_n$ denoted by $[x_1^n, x_2^n, ... x_d^n]$ and label $y_n$ to be predicted. We can just train a $d$-dimensional linear regression $y_n=\sum b_ix_i^n$ to make a prediction. However, I ...
269 views

### Technical Indicators reference

I have been looking for a good reference where I can find how technical indicators of stock market analysis are calculated. I have a dataset (time series) which I want to extract these indicators to ...
19 views

### What is the correct order of operations when cleaning and structuring financial time series?

I'm studying Lopez' Advances in Financial Machine Learning where he talks about how to sample and structure financial data, as well as how to apply machine learning models to the data. I am also ...
22 views

### How to get daily S&P500 dividend and CPI data?

For a project where I'm modelling asset prices using heterogeneous dividend expectatations, I want to investigate the effect of the COVID-19 virus. This means I'm looking at daily stock price data ...
623 views

### Up and Down days in GBPUSD and a Filter

I want to study if the odds of an up or down day in a forex pairs is 50-50. I just count the total number of up and down days in X years and compare it with the total days. The results are very ...
103 views

### GARCH(1,1)-M MLE optimization with fmincon in R

I've searched thru dozens of papers and did not find in any of them satisfying and enough theoretical answers to my concerns. So I've combined everything what I found below. Please indicate if my ...
21 views

### Performance attribution of indices to their sector weights

Is it possible to attribute performance of indices (monthly returns and risk measures - Sharpe ratio, etc.) to their sector weights (if I know them)? Example: I know the monthly performance of ...
454 views

### Multivariate Markov Regime switching GARCH

I have a regression with 4 independent variables and a dependent variable. I want to implement a Regime switching GARCH model but have been unable to find a package in R,Python or Matlab. MSGARCH ...
383 views

### Reverse chronological time-series / inverse time-series

If a timeseries follows a BM, is it true that the inverse ts and reverse chronological ts is also a BM? What if the ts exhibits mean reversion tendencies? Would these tendencies become a momentum ...
24 views

### Forecasting accuracy in one month and hedging

I am working on predicting the daily data of a financial time series $[Y(t+1),...Y(t+j)]$ =$f(X_1(t),...X_1(t-i),.....,X_n(t),...X_n(t-i))$ where $Y$ is a commodity price $X_i$ are predictor variables ...
11 views

### Engle-Granger Regression for returns or prices?

Im trying to find a cointegration relationship between a spot and futures series as I'd like to compute the optimal hedge ratios. As I find the spot and futures at the price level to be nonstationary, ...
57 views

### Backtesting with a walkforward approach

I am setting up a backtesting using a walkforward optimization model to find out if a trading strategy performs well or not and I would like to clarify some doubts: First of all what is the correct ...
19 views

### Align volume bars for multivariate analysis

Looking at the book "Advances in financial machine learning" the author proposes a way to sample high frequency financial data in several fashions which are not only the standard time bars. I was ...
65 views

### Use futures contracts of different lengths to predict spot prices

So I am trying to see how future contracts prices with different time to maturity are able to predict the actual spot price of crude oil at the time of maturity for the contracts. I have the simple ...
181 views

### Is there a way to tell if a time series price data is reversed?

Assuming you are given an array of values representing a stock's historical price, without timestamps, is there a way to tell if this array of prices has been reversed?
31 views

### What value to put in lm() function when testing for cointegration (R)

I'm a CS student working on a financial computing project + have a question regarding cointegration testing using linear regression with the lm() function. https://www.rdocumentation.org/packages/...
2k views

### Why quants think that the risk-neutral measure should not be used for financial forecasting?

In posts regarding the $\mathbb{P}$ vs $\mathbb{Q}$ debate (see 1, 2, 3 or 4), most answers conclude that historical-based forecast are better suited than risk-neutral models for financial predictions....
28 views

### Performance attribution and monthly rebalance: Is a month enough data to calculate Beta and Alpha?

A portfolio is built systematically by calculating scores and rebalanced each month to invest only in the 80 best scores. Scores change frequently and therefore the portfolio changes each month, ...
2k views

### How to simulate cointegrated prices

Is there any simple way to simulate cointegrated prices?
4k views

### 2-step estimation of DCC GARCH model in Python

Embedded in this thread are multiple questions. I'm currently im the process of implementing a DCC GARCH forecast model on quantopian (a python-powered trading platform). The two step consists of ...
19 views

### How to set constraints on the VAR matrix of a Markov-switching VAR model in R?

I’m trying to estimate a Markov-switching VAR model in R and I want the autoregressive matrixes to be constant across the states. In other words, only the intercepts and the covariance matrixes are ...
689 views

### Calculation of dividend yield from index returns

For a research project, I need to find or calculate dividend yield for all the index of major countries in the world (e.g: s&p500,DAX,CAC40 and so on), and I am struggling a bit with it. I cannot ...
305 views

### Generating surface of Kernel Density Estimates over time

I have a 1-minutely OHLC dataset indexed by time as follows: ...
49 views

### Decay factor and volatility (2 assets): do you keep simple correlation to calculate vol? or exponentially weighted correlation?

I have calculated exponentially weighted variances (and covariance) for a future and the underlying index. Now that I have exponentially weighted variances for my 2 assets using a lookback period of ...
9 views

### What is a clear and broad statement about stationarity requirements on features, and then on target for some type of learning to be possible?

I see a lot of vague statements about time series analysis and stationarity but they are all very unclear. I am looking for clear statements on a) the features b) the target c) the learnability of ...
47 views

### Can ARMA and GARCH models be estimated separately in ARMA/GARCH？

Can I use the residuals of the ARMA model to build a GARCH model(with Zero mean)? If so, does this mean that this GARCH model(with Zero mean) has no effect on ARMA's estimates. For example, if I want ...
64 views

### How to apply decay factor in the volatility calculation for 1 asset?

I read somewhere that the decay factor is (1-lamba)*lamba^t where t is first return, second return, third return, ... I also found this formula which I have difficulty to understand: How do I ...
34 views

### Relationship between Data Size and Arima Prediction Interval Width?

When we use Arima model to acquire Interval Predictions, will the width of prediction intervals decrease if we use more data (longer history) to fit the model?
6k views

### Can the concept of entropy be applied to financial time series?

I am not familiar with the concept of entropy for time series. I am looking for good reference papers and examples of use.
9k views

### Squared and Absolute Returns

I've always wondered why do one use squared or absolute returns to determine if volatility modeling is required for the return series? We understand that there are various tests for its ...
634 views

### Can we use White's reality check to compare two Sharpe ratios?

I read a paper from Ledoit and Wolf that proposes a method to compare two Sharpe ratios and a paper from White that proposes a method to compare $n$ trading rules. My question is: Can we use White's ...
873 views

### How to efficiently get covariance matrices from a rolling window in Matlab?

I'am trying to produce a rolling window to estimate a covariance matrix using a for-loop. I have my returns under the variable returns_sec and I have 260 ...
56 views

### Predicting time series based on another

This is more of a generic question, but I'm sure it has a best answer/methodology which is what I'm trying to reach. I'm trying to figure out a solid line of thought when looking at a time series X ...
93 views

### R: Finding peaks on a stock price chart

I would like to do is what I thought to be a simple task: find the locations of peaks for a certain stock, and mark those peaks on a chart. I was surprised by a lack of appropriate examples on the ...
32 views

### R-Help..Question regarding working day Frequency in Time series

I have a data where there are observations based on working days in a year. The working days are not same in each year. These are 248 (say in 2018) observations in first year and then may be 246 ...
43 views

### Updated Time Series Prediction Model When acquiring new data Points - Basic Question

Suppose I have a Time Series Model (assume ARIMA) and use it to make one-step ahead prediction. If I acquire a new data point, (for example I was originally using the first 100 days to fit an Arima ...
131 views

### Process Transforms (Fractional Difference)

Let's say I have a process $X_t$ with unknown variance process $V_t$. Then, I write $\mathrm{EMA}[X_t]$ to be the 5 sec exponential moving average of $X_t$. Consider the transformation \sum (X_t-\...
43 views

### How to compute prediction interval if using simple moving average t o predict?

If I want to use simple moving average to make a prediction. For example given h=1 and m=13. $\hat{x}_{t+1}=\frac{\sum_{j=1}^{13}x_{t-j+1}}{13}$. What is the prediction interval going to be? How to ...
17 views