Questions tagged [time-series]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
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 ...
0
votes
0answers
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 ...
1
vote
1answer
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 ...
2
votes
4answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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 ...
7
votes
1answer
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 ...
2
votes
1answer
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 ...
0
votes
1answer
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 ...
1
vote
2answers
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 ...
1
vote
3answers
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 ...
0
votes
0answers
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 ...
0
votes
0answers
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, ...
2
votes
1answer
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 ...
1
vote
0answers
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 ...
0
votes
1answer
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 ...
3
votes
2answers
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?
1
vote
1answer
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/...
17
votes
5answers
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....
0
votes
0answers
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, ...
9
votes
3answers
2k views

How to simulate cointegrated prices

Is there any simple way to simulate cointegrated prices?
4
votes
1answer
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 ...
0
votes
0answers
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 ...
1
vote
2answers
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 ...
2
votes
1answer
305 views

Generating surface of Kernel Density Estimates over time

I have a 1-minutely OHLC dataset indexed by time as follows: ...
0
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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 ...
0
votes
1answer
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?
22
votes
4answers
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.
3
votes
3answers
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 ...
14
votes
1answer
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 ...
1
vote
1answer
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 ...
1
vote
1answer
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 ...
2
votes
1answer
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 ...
0
votes
0answers
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 ...
0
votes
2answers
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 ...
1
vote
0answers
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-\...
1
vote
0answers
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 ...
0
votes
0answers
17 views

Log Transforming My TS Data for a First Difference Regression

I'm currently working with a ts of monthly yields where $Yield = \frac{Expense}{Blance}$. I am trying to understand the change in yield given a change in the market rate. My regression is $Y = \...
0
votes
0answers
32 views

Calculating the total return on an Interest Rate Swap (with 1 year of duration)

Say I am the fixed rate payer on an interest rate swap and have 1 year of duration of exposure. When I entered into the IRS (say yesterday), the quoted rate on Bloomberg was 15%. Say tomorrow the ...
0
votes
1answer
38 views

Subscription Based Revenue Prediction

My dataset is on revenues from subscription-based (no commitment, can cancel any time). We have people signing up every year, continue paying for a few years and then gradually cancel the subscription....
0
votes
0answers
14 views

Can this be taken as a panel data?

I have a data set of different time periods but same length. For example, I have a data set of GDP and energy consumption for five countries. For country A, I have the data from 1995 to 2000. But for ...
0
votes
1answer
94 views

Random Forest on financial time-serie?

Is it okay to apply Random Forest to a non-stationary financial serie? Or would it be correct to first difference the serie and then apply Random Forest to the new serie?
0
votes
0answers
39 views

Why ARIMA is better for shorter term forecasting compared to ECM?

I'm reading up about the Error Correction model and was confused by the statements below, from here: In order to still use the Box–Jenkins approach, one could difference the series and then ...
3
votes
0answers
45 views

Expected Shortfall for ARMA-GARCH Model

I need to find an analytical solution for the 99% confidence expected shortfall (CVaR) for a long position of 100 dollars at time $t$ for an asset with returns modeled by an ARMA(1,1)-GARCH(1,1) model ...
0
votes
0answers
27 views

How to approximate expectation and variance of an integral from a discrete Time series financial dataset?

I have discrete time series financial data, with time($u$), price($S$) and someVariable($q$) which looks something like this. ...
18
votes
6answers
54k views

How to fit ARMA+GARCH Model In R?

I am currently working on ARMA+GARCH model using R. I am looking out for example which explain step by step explanation for fitting this model in R. I have time series which is stationary and I am ...
1
vote
2answers
1k views

Online algorithm for calculating EWMA at irregular intervals?

What is a fast online algorithm for calculating the EWMA (exponentially weighted moving average) of an input variable observed at irregular intervals? I know the formula for when sampling at regular ...

1
2 3 4 5
12