Questions tagged [moving-average]

A calculation of the average value of the most recent (within some window) values in a time series, rather than the average of the entire series.

Moving average is a calculation of the average value of the most recent (within some window) values in a time series, rather than the average of the entire series.

1034 questions
-1
votes
1 answer

A one line command to get the average of specific column in big file

I need to setup a one line command to get an average of huge amount of numbers in one column in a file contains multiple columns, we need to add the arguments for the file name and the number of column needed from the big file Example: #…
mshafey
  • 89
  • 1
  • 9
-1
votes
1 answer

How to define histogram / date_histogram as parent of a moving average aggregation

Using elastic search and java. Not using a json or other external resource for the query.
madarinho
  • 87
  • 1
  • 1
  • 10
-1
votes
2 answers

Moving averages

I have daily data for over 100 years that looks like 01.01.1856 12 02.01.1956 9 03.01.1956 -12 04.01.1956 7 etc. I wish to calculate the 30 year running average for this huge data. I tried converting the data into a time series but cant…
Dearie.K
  • 11
  • 1
-1
votes
1 answer

Line chart using jquery or javascript

I am trying to make a line chart of stock data. I want to plot three lines on the graph: close, and two running averages. It's important the lines be thin, something like the Yahoo finance charts.I saw chartjs, but there are a few things I don't see…
Aryeh Beitz
  • 1,974
  • 1
  • 22
  • 23
-1
votes
1 answer

MATLAB: Vectors, Sequential Elements and rand

This question is from chegg.com. Given a vector a of N elements a_{n},n =1,2,...,N, the simple moving average of m sequential elements of this vector is defined as mu(j) = mu(j-1) + (a(m+j-1)-a(j-1))/m for j = 2,3,...,(N-m+1) where mu(1) =…
Stan-Lee
  • 11
  • 5
-1
votes
1 answer

Moving incremental average

I am writing a function in C++ to calculate the moving average of a data stream. I want to use incremental averaging . As am implementing this on a relatively weak microprocessor I want to perform a moving average. That is, I want to perform an…
GammaRui
  • 21
  • 2
-1
votes
1 answer

Win percentage rolling average in Stata

I'm currently producing some work on a win percentage rolling average for international football managers, as I aim to use this in some duration modelling in the future. I'm just a little unsure on how to produce this rolling average in Stata to…
-1
votes
1 answer

MySQL Moving 12 Month Sum by Group

I want to get the sum of values over the previous 12 months, similar to: Trailing Sum Query The main difference is that I want the trailing 12 month sum, where each group is calculated independently. Here's sample data where the quarters are always…
user1106278
  • 747
  • 1
  • 9
  • 18
-1
votes
2 answers

Moving Average across Variables in Stata

I have a panel data set for which I would like to calculate moving averages across years. Each year is a variable for which there is an observation for each state, and I would like to create a new variable for the average of every three year…
Jess
  • 275
  • 5
  • 12
-1
votes
1 answer

FFT frequency measurement VS measuring signal's period with timer

Hello! I am working around a project, in which I have to measure a frequency of the signal coming to STM32 microprocessor. The frequency is about 2210 Hz. I have done it by measuring period of square wave (sine wave passed through comparator) with…
-1
votes
1 answer

How do you create a Moving Average Method in SQL?

How do you create a Moving Average Method in SQL? order table: id_order id_staff date_order O0001 S0003 12/12/2555 O0002 S0003 12/12/2555 O0003 S0003 12/12/2555 O0004 S0003 13/12/2555 O0005 S0003 13/12/2555 O0006 S0003 …
-2
votes
1 answer

Rolling average of 12 months minus the last month for a dataframe column with a datetime index

I am trying to do a rolling average of 12 months minus 1 month, where the index is a datetime object of business days. I can probably iterate through the dataframe with enumerate, but this is not very efficient, and I would like to find a way to use…
-2
votes
1 answer

Moving Average non serially

We have sampling data. on each time we have a different sampling value: Each sample is (time, value) -> list of samples [(t1,v1),...(tn,vn)] Our job is to implement moving_avg(data, window_sec). Data -> list of samples…
hilas57
  • 1
  • 1
-2
votes
2 answers

calculate moving average of an static array in c

I wrote this code to calculate moving average of array in c. Array_MovingAverage(const int inputSeries[], size_t inputSize, size_t window, float output[], size_t…
Leviathan
  • 5
  • 1
  • 7
-2
votes
1 answer

can you use pine-script to alert you that an indicator has passed a certain level for the first time in a few months?

so im trying to write a script which can alert me when the sma of the williams%r crosses above -20 or bellow -80, for the first time in 1 month for example. is this possible with pinescript?. thanks in advance.
1 2 3
68
69