Replies: 4 comments
-
All right all solved |
Beta Was this translation helpful? Give feedback.
-
I put all the new functions into the original class, and it worked.
I kept getting errors with two classes.
Regards
Rory Mackay
***@***.***
…On Thursday, January 4th, 2024 at 8:04 PM, t3chap ***@***.***> wrote:
Did the new rawdata.py file in your solution have two combined classes? or does it contain both? I'm running into the same problem; in my case I can get it to work to run a backtest but I can't run it in production mode yet.
Thanks
—
Reply to this email directly, [view it on GitHub](#1311 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AA2DQX33SY3TDJ7KGT7O4STYM5NRRAVCNFSM6AAAAABBEU7SZOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAMJYHA2TK).
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Rorymac- Thanks. I had the same problem with both classes but I found your repository and your solution and it worked for me. Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
FYI commit 1011459 might have broken this, it did for a new system I setup. I had to add
to your version of rawdata to make it work. positionsizing.py and rawdata.py were changed in this commit. |
Beta Was this translation helpful? Give feedback.
-
TLDR: getting an attribute error trying to access the function in rawdata.py
Hello All, Happy Christmas.
BTW running a backtest all the following works in the original code.
Reading Rob's latest book (yes it is taking a bit of time.) I am trying to implement some of the strategies, in particular skewabs and skewrv, The code for these is in the codebase under
~/pysystemtrade/systems/provided/rob_system/rawdata.py
a bit more back ground so in the config.yaml the code calling the rule is as follows"
So when calling the function get_demeanded_factor_value - you will get an error, this is because the
rawdata.py
file is modified in the same directory (/systems/provided/rob_system/
), see explanation which follows.So to get it to work in production.
I tried using the work around that Rob used there - but with a tweak, renamed the file in
~/pysystemtrade/systems/rawdata.py
torawdata_orig.py
and then added the~/pysystemtrade/systems/provided/rob_system/rawdata.py
into the~/pysystemtrade/systems/
as rawdata.pyAs it has the following line :
from systems.rawdata import RawData
but after setting up a live file to test, when running run_systems I get an attribute error the meat of which is as follows:
Generally it would appear from searching the interwebs that this is due to an incorrect reference, in this instance however I do believe there is an odd python tweak that needs to be dome as they are similarly named, and the new class is a subclass.
Has anyone any insight into this or indeed another method of accessing this code in run_systems ?
Prior to trying this hack the attribute error was not finding the
get_demeanded_factor_value
functionThank you.
Beta Was this translation helpful? Give feedback.
All reactions