pat42w / EF_Portfolio_Optimization

This project aims to test Portfolio Optimization methods on stock data in python.
MIT License
2 stars 0 forks source link

Create Documentation #9

Open pat42w opened 3 years ago

pat42w commented 3 years ago

Started to add documentation to the functions .py file to each function using the format:

def getLastEntryDate(database):
    """Gets the most recent entry date from 
    the prices database
    Parameters
    ----------
    database : DataFrame
        The database of prices with a date column or index 'Date'

    Returns
    -------
    str
        The most recent entry date in '%Y-%m-%d' format
    """
    lastDateEntry = database.iloc[-1]['Date']
    lastDateEntry = datetime.datetime.strptime(lastDateEntry, DATE_FORMAT)    
    return lastDateEntry

Don't think there's a need for a documentation file on its own yet anyways but ill keep adding these to the funtion's in the .py file and I'll try to ensure any functions we add to this file have this documentation done as we add them to keep up good practices :)

pat42w commented 3 years ago

https://towardsdatascience.com/the-reusable-python-logging-template-for-all-your-data-science-apps-551697c8540 Useful post on logging