QSTK eventprofiler function not showing correctly

Using the QSTK course for the Georgia Tech Coursera Computational Investing, the eventprofiler function at the end of the /EventProfiler/tutorial.py examples does not display the graph shown in the video. (See image below.)

Other PDF files created for exercise in week 4 are empty, except for event numbers that are correct. Creating PDF files seems unnecessary because these numbers can only be output to the terminal.

I looked at the error output for index.py:2204 shown in the image, but the fix is ​​not obvious. (Some other backtraces on similar (but not identical) issues in pandas-related github errors put index.py in the middle of a healthy call stack.)

no plot on the plot!

eventprofiler, , , . Qaru QSTK, pandas, 5- .

. VirtualBox, Ubuntu QSTK, wiki Quantsoftware Georgia Tech Coursera Computational Investing. , , , .

+4
2

EventProfiler.
Ubuntu /usr/local/lib/python 2.7/dist-packages/QSTK-0.2.8-py2.7.egg/QSTK/qstkstudy/EventProfiler.py

:

if b_market_neutral == True:
    df_rets = df_rets - df_rets[s_market_sym]
    del df_rets[s_market_sym]
    del df_events[s_market_sym]

. df_rets NaNs. , , - , .
, for :

if b_market_neutral == True:
    for sym in df_events.columns:
        df_rets[sym] = df_rets[sym] - df_rets[s_market_sym]
    del df_rets[s_market_sym]
    del df_events[s_market_sym]

EventProfiler.py . . Endeavour, , , 0,1 0,6, :

if b_errorbars == True:
    plt.errorbar(li_time[i_lookback:], na_mean[i_lookback:],
                yerr=na_std[i_lookback:], ecolor='#AAAAFF',
                alpha=0.6) #Changed alpha from 0.1 to 0.6 (Jose A Dura)
+5

, qstkstudy/EventProfiler.py

if b_market_neutral == True:
    df_rets = df_rets - df_rets[s_market_sym] # it fails here
    del df_rets[s_market_sym]
    del df_events[s_market_sym]

:

if b_market_neutral == True:
        df_rets = df_rets.sub(df_rets[s_market_sym].values, axis=0)
        del df_rets[s_market_sym]
        del df_events[s_market_sym]
0

Source: https://habr.com/ru/post/1616915/


All Articles