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

Add new trading rules to InferTrade that use the technical analysis rules with conventional recipe #141

Closed ta-oliver closed 1 year ago

ta-oliver commented 3 years ago

Currently we have rules that calculate a technical analysis rules and then determine positions by linear regression.

The class used to calculate the allocation from the signal is here.

Many technical trading rules do not use a regression to calculate their sizing, but use entry and exit rules based on a formula.

We therefore want to create trading rules that replicate the conventional trading approach along the current option of sizing through regression.

To do so we need three things:

The new Python rules should be in here. The tex files and PDFs should be here.

Images that may be needed are here

ta-oliver commented 3 years ago

@fhashim - unfortunately we can't link issues unless they fully address an issue (as issue will close prematurely when PR is merged).

Cal231995 commented 3 years ago

Here is the sample of one of the most basic use tech indicators for traders.

The condition/parameter is to give a buy signal when the price is above ema50 and vice versa give a sell signal when the price is below the ema50. (we can adjust the ema length later depend on user).

We're trying to test it with @bi-kash and once ready for testing we can add more complicated ones, tech indicators that are used in traditional ways by traders. ![Uploading ema 50.JPG…]()

Cal231995 commented 3 years ago

DECRIPTION : EXPONENTIAL MOVING AVERAGE (50)

CONDITION/PARAMETER : GIVE A BUY SIGNAL WHEN THE ASSET PRICE CLOSED ABOVE THE EMA50 VALUE AND VICE VERSA GIVE A SELL SIGNAL WHEN THE ASSET PRICE CLOSED BELOW OR LOWER THAN EMA50 VALUE ema 50

LINK FOR FURTHER DETAILED EXPLANATION OF EXPONENTIAL MOVING AVERAGE: https://www.investopedia.com/terms/e/ema.asp

Cal231995 commented 3 years ago

Hi sir @ta-oliver , for your comments regarding this format of documentation here in gihub. Thanks

ta-oliver commented 3 years ago

Let's move each trading rule addition to its own GitHub issue? You can use "Reference in new issue" to do this.

image

Cal231995 commented 3 years ago

noted sir. thanks

ta-oliver commented 3 years ago

Many thanks @Cal231995 , @bi-kash and @fhashim !

Shall we close this issue or are there any other technical rules we would like to add?

john-adrian-cal-inferstat commented 3 years ago

Many thanks @Cal231995, @bi-kash, and @fhashim!

Shall we close this issue or are there any other technical rules we would like to add?

Hi, Sir @ta-oliver I think we can close this one now. we can add more in the future for any developments that might come. Thanks.