> For the complete documentation index, see [llms.txt](https://docs.fractalworks.io/joule/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fractalworks.io/joule/components/analytics/analytic-tools/analytic-functions/stateful/exponential-moving-average.md).

# Exponential moving average

## Objective

Exponential smoothing or exponential moving average is a rule of thumb technique for smoothing time series data using the exponential window function. Whereas in the simple moving average the past observations are weighted equally, exponential functions are used to assign exponentially decreasing weights over time.

## Example

```yaml
time window:
  emitting type: priceEMAAnalytics
  window functions:
  ema rates:
    function:
      exponential moving average:
        parameters:
          smoothing factor: 0.001996007984032
    attributes: [ ask,bid ]
  policy:
    type: slidingTime
    slide: 500
    window size: 2500
```

### Output attributes

After processing, attributes receive automatically applied postfix ID = `EMA`

| Before processing | After processing | Type         |
| ----------------- | ---------------- | ------------ |
| ask               | ask\_EMA         | double value |
| bid               | bid\_EMA         | double value |

### Parameters

<table><thead><tr><th width="186">Parameter</th><th width="341">Description</th><th>Type</th></tr></thead><tbody><tr><td>smoothing_factor</td><td>Smoothing constant to be applied within the EMA calculation<br>Use ( 2 / 1 - Time Periods) as the smoothing constant.</td><td>Double<br>Default: 0.333</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fractalworks.io/joule/components/analytics/analytic-tools/analytic-functions/stateful/exponential-moving-average.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
