ZhengyaoJiang / PGPortfolio

PGPortfolio: Policy Gradient Portfolio, the source code of "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem"(https://arxiv.org/pdf/1706.10059.pdf).
GNU General Public License v3.0
1.74k stars 750 forks source link

Four undefined names #2

Closed cclauss closed 6 years ago

cclauss commented 6 years ago

flake8 testing of https://github.com/ZhengyaoJiang/PGPortfolio on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./pgportfolio/tdagent/tdagent.py:110:24: F821 undefined name 'x'
        x_0 = np.zeros(x.size)
                       ^

./pgportfolio/tdagent/tdagent.py:114:37: F821 undefined name 'x'
        bnds = [(0., max_leverage)]*x.size
                                    ^

./pgportfolio/tdagent/tdagent.py:119:21: F821 undefined name 'x'
                x = x + np.random.randn(1)[0] * 1e-5
                    ^

./pgportfolio/tools/configprocess.py:81:28: F821 undefined name 'unicode'
    elif isinstance(input, unicode):
                           ^

4     F821 undefined name 'x'
dexhunter commented 6 years ago

@cclauss Hi! Thank you for pointing out the error! Actually this function is replaced by built-in function at corresponding sub-class of tdagent (like bcrp).