moving-average Questions
4
Solved
Hi Is possible to calculate EMA in javascript?
The formula for EMA that I'm trying to apply is this
EMA = array[i] * K + EMA(previous) * (1 – K)
Where K is the smooth factor:
K = 2/(N + 1)...
Tropopause asked 15/10, 2016 at 8:52
3
I have incoming data and I want to compute the average, 95th and 99th percentile of that data - I am most interested in the last 1000 values. At any time, I'd like to query this object to get any o...
Hungary asked 8/5, 2013 at 22:23
20
Solved
There seems to be no function that simply calculates the moving average on numpy/scipy, leading to convoluted solutions.
My question is two-fold:
What's the easiest way to (correctly) implement ...
Egress asked 14/1, 2013 at 4:59
2
I have written the function below in order to find the SMA of a csv file according to the desired SMA formula, However, something is wrong with my formula which I can't figure it out.
def SMA_calcu...
Posthumous asked 25/1 at 21:6
10
I am trying to find a way to calculate a moving cumulative average without storing the count and total data that is received so far.
I came up with two algorithms but both need to store the count:...
Bladderwort asked 28/9, 2012 at 8:46
3
Solved
I would like to get rolling average for each of the numeric variables that I have. Using data.table package, I know how to compute for a single variable. But how should I revise the code so it can ...
Empathic asked 17/7, 2015 at 18:27
18
Solved
I'm trying to use R to calculate the moving average over a series of values in a matrix. There doesn't seem to be a built-in function in R that will allow me to calculate moving averages. Do any pa...
Quaquaversal asked 13/4, 2009 at 12:52
3
Solved
I come up with this
n=1;
curAvg = 0;
loop{
curAvg = curAvg + (newNum - curAvg)/n;
n++;
}
I think highlights of this way are:
- It avoids big numbers (and possible overflow if you would sum and...
Constipate asked 2/3, 2015 at 22:48
4
Solved
I wanted to perform moving average through timestamps.
I have two columns: Temperature and timestamps (time-date) and I want to perform the moving average based on every 15 minutes successive tempe...
Bentonbentonite asked 11/12, 2012 at 10:40
5
Solved
Below you can see my C# method to calculate Bollinger Bands for each point (moving average, up band, down band).
As you can see this method uses 2 for loops to calculate the moving standard deviat...
Impatience asked 31/1, 2013 at 21:45
3
Solved
I need to calculate some rolling forward averages in a dataframe and really don't know where to start.
I know if I wanted to select a cell 10 days ahead say I would do df.shift(-10), but what I'm ...
Ethology asked 19/4, 2019 at 7:17
6
Solved
If you have 50 years of temperature weather data (daily) (for example) how would you calculate moving averages, using 3-month intervals, for that time period? Can you do that with one query or woul...
Nevanevada asked 6/8, 2014 at 1:42
1
Solved
So I want to spread the shipments per ID in the group one by one by looking at avg sales to determine who to give it to.
Here's my dataframe:
ID STOREID BAL SALES SHIP
1 STR1 50 5 18
1 STR2 6...
Earl asked 14/11, 2021 at 20:37
30
Solved
Is there a SciPy function or NumPy function or module for Python that calculates the running mean of a 1D array given a specific window?
Carmen asked 5/12, 2012 at 16:57
4
I want to compute a moving average using a time window over an irregular time series using pandas. Ideally, the window should be exponentially weighted using pandas.DataFrame.ewm, but the arguments...
Reames asked 19/11, 2017 at 13:47
3
Solved
There is a great question on how to split a JavaScript array into chunks. I'm currently using this for some statistical methods I'm writing and the answer that I'm using is as follows (although I c...
Timotheus asked 20/2, 2013 at 17:18
2
Solved
I have some code that is pretty slow, that calculates multiple rolling averages over different time periods (e.g. 3 - 1260 days, or 5 years), but it is very slow and somewhat memory inefficient giv...
Pious asked 12/8, 2021 at 15:3
16
Solved
What is the fastest library/algorithm for calculating simple moving average? I wrote my own, but it takes too long on 330 000 items decimal dataset.
period / time(ms)
20 / 300;
60 / 1500;
120...
Limewater asked 14/10, 2012 at 17:18
8
Solved
I have a time series in the form of a SortedList<dateTime,double>. I would like to calculate a moving average of this series. I can do this using simple for loops. I was wondering if there is...
Gannes asked 2/3, 2011 at 11:17
11
Solved
I know this is achievable with boost as per:
Using boost::accumulators, how can I reset a rolling window size, does it keep extra history?
But I really would like to avoid using boost. I have goo...
Farrah asked 12/6, 2012 at 4:38
3
I am trying to write a pine script with two indicators one overlaid on the chart (EMA) and another on its own?(Stoch) I cannot seem to find any info on how to separate these (Visually) but keep the...
Backman asked 28/1, 2020 at 19:58
1
I have product data like this
Product Date Sales Availbility
xyz 2017-12-31 724.5 6.0
xyz 2018-01-07 362.25 7.0
xyz 2018-01-14 281.75 7.0
xyz 2018-01-21 442.75 7.0
xyz 2018-01-28 442.75 6.0
...
Coati asked 4/6, 2018 at 20:18
6
Solved
I have a dataframe containing time series for 100 objects:
object period value
1 1 24
1 2 67
...
1 1000 56
2 1 59
2 2 46
...
2 1000 64
3 1 54
...
100 1 451
100 2 153
...
100 1000 21
I want to c...
Olympian asked 16/11, 2018 at 13:40
2
When calculating a simple moving average, numpy.convolve appears to do the job.
Question: How is the calculation done when you use np.convolve(values, weights, 'valid')?
When the docs mentioned ...
Capsulate asked 17/11, 2013 at 21:53
4
I would like to add a moving average calculation to my exchange time series.
Original data from Quandl
Exchange = Quandl.get("BUNDESBANK/BBEX3_D_SEK_USD_CA_AC_000",
authtoken="xxxxxxx")
# Value...
Anomalous asked 15/10, 2016 at 15:25
1 Next >
© 2022 - 2024 — McMap. All rights reserved.