Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation? #25

Closed
kramer65 opened this issue Feb 22, 2013 · 7 comments
Closed

Documentation? #25

kramer65 opened this issue Feb 22, 2013 · 7 comments

Comments

@kramer65
Copy link

Hello,

I just opened an issue which was resolved fantastically (thanks a million!). I was just now searching for documentation on the actual functions. I just ran an RSI (which I was initially after) but I was wondering whether I can set any options (like the period to look back with the RSI). The only thing I can find however is this function list: http://www.ta-lib.org/function.html

Is there any other more verbose explanation of the different functions and the arguments they take?

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Feb 22, 2013

In general, we try and make sure that each function has documentation about its
parameters (generated from the documentation that the underlying ta-lib C
library provides).

For example:

>>> import talib
>>> help(talib.RSI)
Help on built-in function RSI in module talib.func:

RSI(...)
    RSI(real[, timeperiod=?])

    Relative Strength Index (Momentum Indicators)

    Inputs:
        real: (any ndarray)
    Parameters:
        timeperiod: 14
    Outputs:
        real

What kinds of documentation are you looking for?

@kramer65
Copy link
Author

Ah yes, of course. I've been developing with Python for about half a year now, and I keep forgetting this help function. Thanks for reminding. That was all I needed.. :) . Thanks for creating all this. You saved me a couple days of work and made my week even better than it already was!

@kramer65 kramer65 reopened this Feb 22, 2013
@mrjbq7
Copy link
Collaborator

mrjbq7 commented Feb 22, 2013

No problem! I love to hear feedback, and if there's anything that would make
it easier for you to use, let us know!

Also, if you use iPython, it provides the "?" operator:

$ ipython
Python 2.7.3 (default, Dec 22 2012, 21:14:12) 
Type "copyright", "credits" or "license" for more information.

IPython 0.13.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import talib

In [2]: ?talib.RSI
Type:       builtin_function_or_method
String Form:<built-in function RSI>
Docstring:
RSI(real[, timeperiod=?])

Relative Strength Index (Momentum Indicators)

Inputs:
    real: (any ndarray)
Parameters:
    timeperiod: 14
Outputs:
    real

And, the help just grabs the function docstring (__doc__):

>>> print talib.RSI.__doc__
 RSI(real[, timeperiod=?])

    Relative Strength Index (Momentum Indicators)

    Inputs:
        real: (any ndarray)
    Parameters:
        timeperiod: 14
    Outputs:
        real

@mrjbq7 mrjbq7 closed this as completed Feb 22, 2013
@kramer65
Copy link
Author

Just to answer your question. If the installation of the combination of TA-lib and it's python wrapper would have been a bit easier that would be great. Preferably of course in one command and without downloading anything, but otherwise by downloading just one package and installing that.

Also, even though it is present in the docstrings, it is always interesting if all the docstrings would just be listed together with the respective functions on the website. In that way you can also check out all its functions a bit easier without needing to install everything.

I think this library is a blessing to the financial world. I presume it doesn't work under pypy (since it's in C), but if that could work it would be even better (I use pypy a lot to speed up many analyses).

For the rest. Thanks a lot again!

@briancappello
Copy link
Contributor

Thanks for the feedback! At least on Ubuntu, the installation problem stems from nobody having packaged TA-Lib and the python wrapper into a PPA yet. I know a bit about it so I may eventually look into that if I ever find some time. Pretty low priority though; these libraries are typically developer oriented where a little extra installation effort isn't too unexpected.

@kramer65
Copy link
Author

Hi @briancappello

Using epydoc I just created a pdf listing all the functions and its inputs and outputs. I mainly did it for my own use so that I don't always have to fire up a terminal to look over the documentation in the docstrings, and also to just "scroll around"..
I suppose it could be usefull to post this on the website somewhere under documentation or something. Using epydoc you can also easily make HTML for this, which might also be easy to post it on the website.

Anyway, here is the pdf: http://hkramer.nl/opslag/ta-lib_functions.pdf

Cheers!

@briancappello
Copy link
Contributor

Nice, I like it!
A little bit of work got started in this regard; check out the documentation index - perhaps not as polished as your PDF but it's something basic. The code to generate the current website is actually in the repository right now if you're curious to improve it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants