Ami2py - import AB data into a python df

ami2py will read AmiBroker data into python. The current version is .0.8.1 WARNING: It only provides day resolution on data.

It looks like the authors did some work on providing intraday resolution but never finished.

The following few lines of code read a symbol from AmiBroker into a pandas df

    import pandas
    import ami2py
    
    folder='C:/Program Files/AmiBroker/Databases/StockCharts'
    symbol='indu'
    df = pandas.DataFrame()
    symbolData = ami2py.AmiDataBase(folder).get_dict_for_symbol(symbol)
    for z in ['Year', 'Month', 'Day', 'Open', 'High', 'Low', 'Close', 'Volume'] :
        df[symbol+':'+z] = symbolData[z]
    print(df.describe())

we now have a plugin called AmiPy

you can simply pass complete arrays to python and put it into a dataframe

An example is shown here:

AmiPy and Ami2Py are 2 different things.

AmiPy supports python function calls from AB.

Ami2Py reads AB database data from python. It is fast. It imported about 1M ticks in a few minutes. The issue is that it does not have H:M:S resolution. Today, i wrote a python COM client to import ticks from an AB database. My estimate is it will take it about 15 hours to do the same thing. If my data was only EOD, Ami2Py would be clearly be the python data import tool of choice.

ah ok thanks, I was unaware of that

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.