ta-oliver / infertrade

Open source trading and investment strategy library designed for accessibility and compatibility
Apache License 2.0
34 stars 20 forks source link

Strategy Documentation - Exponential Moving Average #154

Closed fhashim closed 3 years ago

fhashim commented 3 years ago

@ta-oliver @Cal231995 I've initialised the creation of documentation for Exponential moving average strategy.

@Cal231995 please provide images and relevant mathematical formulation along with the required content to be added in documentation.

fhashim commented 3 years ago

@Cal231995 I've added a pdf documentation of this strategy here. Let me know your thoughts. I need to add the mathematical formulation of this strategy in section equation. Can you provide that?

Cal231995 commented 3 years ago

@Cal231995 I've added a pdf documentation of this strategy here. Let me know your thoughts. I need to add the mathematical formulation of this strategy in section equation. Can you provide that?

EMA50 FORMULA

Here is the formula for Exponential Moving Average

Cal231995 commented 3 years ago

@Cal231995 I've added a pdf documentation of this strategy here. Let me know your thoughts. I need to add the mathematical formulation of this strategy in section equation. Can you provide that?

EMA50 FORMULA

Here is the formula for Exponential Moving Average

you can find the source here. thanks https://www.investopedia.com/terms/e/ema.asp

Cal231995 commented 3 years ago

This looks great!

I do have some recommendations. I think we should add the definition of Ema first then introduce the trading strategy next. Table of contents 1.) defintion of Ema (includes formula) Then 2.)trading strat description 3.)rule parametrs 4.) glossary

ema work

Defintion of ema ![Uploading ema meaning.JPG…]()

Cal231995 commented 3 years ago

I think we should add the definition of Ema first then introduce the trading strategy next. Table of contents 1.) defintion of Ema (includes formula) Then 2.)trading strat description 3.)rule parametrs

Defintion of ema

@ta-oliver any thoughts or recommendations ? Thanks

Cal231995 commented 3 years ago

definition of ema ema meaning 50 DAY EMA CHART EXPLAINE

Cal231995 commented 3 years ago

Trading strat image EMA50 PROCESS

fhashim commented 3 years ago

@Cal231995 can you also provide the default smoothing factor.

ta-oliver commented 3 years ago

I think we should add the definition of Ema first then introduce the trading strategy next. Table of contents 1.) defintion of Ema (includes formula) Then 2.)trading strat description 3.)rule parametrs Defintion of ema

@ta-oliver any thoughts or recommendations ? Thanks

@Cal231995 , @fhashim - let's follow the same format as the other PDFs for consistency to avoid having to recreate any of the existing rules. We can change format later if we really want to, but will need to be for all PDFs.

ta-oliver commented 3 years ago

@Cal231995 can you also provide the default smoothing factor.

This should hopefully be in the associated Python code?

Cal231995 commented 3 years ago

@Cal231995 can you also provide the default smoothing factor. https://www.investopedia.com/terms/e/ema.asp

ema smmoth

fhashim commented 3 years ago

@Cal231995 please review the updated documentation. I've added the equation for this rule and I've updated the rule parameters.

Please verify if the default values are correct in rule parameters. thanks.

@Cal231995 for the changes that you've requested I am not sure what to do as changes to tex file ChangeRegression & ChangeRelationship has nothing to do with this branch and documentation of this rule. If you want to view changes that I've made to existing docs you can review them in this PR.

Cal231995 commented 3 years ago

@Cal231995 please review the updated documentation. I've added the equation for this rule and I've updated the rule parameters.

Please verify if the default values are correct in rule parameters. thanks.

@Cal231995 for the changes that you've requested I am not sure what to do as changes to tex file ChangeRegression & ChangeRelationship has nothing to do with this branch and documentation of this rule. If you want to view changes that I've made to existing docs you can review them in this PR.

@fhashim I've only requested for the addition of mathematical formula. I think it's okay now. just need to confirm the lenght we used as deafult. I know it's 50 not 14 ema parameters

@bi-kash need your help for confirmation. thanks

ta-oliver commented 3 years ago

@bi-kash need your help for confirmation. thanks

@Cal231995 - the default value is in the function argument of the added function. @fhashim can help show you where this is in allocations.py

If you need a second opinion on the Python, @NikolaR01 can assist.

fhashim commented 3 years ago

@fhashim I've only requested for the addition of mathematical formula. I think it's okay now. just need to confirm the lenght we used as deafult. I know it's 50 not 14

@Cal231995 as per allocations.py currently it is set to 1. @bi-kash Can you also confirm this? thanks.

bi-kash commented 3 years ago

@fhashim made the necessary update for default values. Please refer to this: https://github.com/ta-oliver/infertrade/pull/161/commits/715b5e0fbb9dfa2498d08b0d69d07cf39602fa7e

fhashim commented 3 years ago

@bi-kash thanks for updating.

@Cal231995 I've updated the doc with default window size. Please review the doc. If there are any changes required please suggest.

Cal231995 commented 3 years ago

@bi-kash thanks for updating.

@Cal231995 I've updated the doc with default window size. Please review the doc. If there are any changes required please suggest.

The last file is ok. also, window size is now 50. this is good to go.

ta-oliver commented 3 years ago

this is good to go.

N.B. you are a reviewer, Cal, so you can approve the PR and merge if all is good.

Cal231995 commented 3 years ago

Exponential Moving Average (EMA) is a type of moving average similar to simple moving average, but it reduce the lag by applying more weight to recent prices. The weighting applied varies depending on the number of periods use in the moving average. Traders used this more to get a clearer view of the most recent price change of an asset.

@fhashim you can used this definition of ema. I composed this myself. Thank you