nautilus_trader icon indicating copy to clipboard operation
nautilus_trader copied to clipboard

Add more indicators

Open graceyangfan opened this issue 2 years ago • 4 comments

As disscussed in #515 I decided to moving more indicators to nautilus_trader with the inside functions, the main reference libaries are: (1) pandas-ta (2) finta (3) https://github.com/mrjbq7/ta-lib now,I am working on pandas-ta.In fact,I have rewrite some pandas-ta indicators with nautilus_trader's inside functions,I will gradually pull them.

graceyangfan avatar Jun 02 '22 09:06 graceyangfan

Many thanks for your efforts!

I haven't looked too closely at libraries 1 or 2 yet, however we do want to be mindful of bloating the project dependencies. I think more indicators are valuable, at worse we can make them optional.

cjdsellers avatar Jun 03 '22 03:06 cjdsellers

I read your first post more carefully and see that you are merely using those libraries as a reference, and manually hand crafting the indicators for the project one at a time. I think this is a great approach, more labor intensive, however better for the platform overall.

Out of interest, do those other libraries unit test the indicators? Asserting the same outputs in the tests could be a good idea.

Your efforts here are much appreciated!

cjdsellers avatar Jun 08 '22 15:06 cjdsellers

@cjdsellers Yes, I am using those libraries as a reference.So it is not always to reproduce these indicators 100%.Now,the two added indicators give the same results with pandas-ta during my test,but I am not sure if I should include this test in unit-test code, because this introduce a new library.

graceyangfan avatar Jun 08 '22 22:06 graceyangfan

I think your current approach is good. Just using the other library as a reference to aid development, and inform the test cases - without having to take a dependency.

cjdsellers avatar Jun 09 '22 15:06 cjdsellers