You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
TL;DR
Add parameter to sim command. outputs json file with sim results. Modify backtesters to use said json file.
The change comes from working with the genetic_backtester and some errors that occur when it scrapes the JSON results from stdio.
Occasionally the regex will fail with index 1 not found.
This error only seems to occur after a period of time, it is rather random. When debugging, it seems the failure is in the regex when decodes the first match. reworking/debugged the regex, filtering the text before the regex doesn't seem to correct the problem, I have a theory that it is some control character causing it to fail.
I propose and alternative solution; writing out the Config JSON output to a file after the sim completes with an additional item added to the json called simresults which has all the results (end currency, trades, etc) from the sim.
I have a modification to the sim command that adds a new parameter called backtester_generation. It accepts a number. if the number is greater than 0 it writes the json file in the format of <selectedexchange.marketpair>-<backtester_generation>.json
This file can then be read by the backtesters instead of scraping using regex, this will provide more reliability and eliminate the possibility of extra text in the stdio causing problems.
I also see an alternative approach where we store the results in mongodb, which I think should be the final direction, which would allow for easier continuation of generations instead of the current setup using json files, the downside is a lot of extra data bloating the database.
Looking for comments, thoughts, other ideas of what could be done with this, or nah not needed.
The text was updated successfully, but these errors were encountered:
TL;DR
Add parameter to sim command. outputs json file with sim results. Modify backtesters to use said json file.
The change comes from working with the genetic_backtester and some errors that occur when it scrapes the JSON results from stdio.
Occasionally the regex will fail with index 1 not found.
This error only seems to occur after a period of time, it is rather random. When debugging, it seems the failure is in the regex when decodes the first match. reworking/debugged the regex, filtering the text before the regex doesn't seem to correct the problem, I have a theory that it is some control character causing it to fail.
I propose and alternative solution; writing out the Config JSON output to a file after the sim completes with an additional item added to the json called simresults which has all the results (end currency, trades, etc) from the sim.
I have a modification to the sim command that adds a new parameter called backtester_generation. It accepts a number. if the number is greater than 0 it writes the json file in the format of <selectedexchange.marketpair>-<backtester_generation>.json
This file can then be read by the backtesters instead of scraping using regex, this will provide more reliability and eliminate the possibility of extra text in the stdio causing problems.
I also see an alternative approach where we store the results in mongodb, which I think should be the final direction, which would allow for easier continuation of generations instead of the current setup using json files, the downside is a lot of extra data bloating the database.
Looking for comments, thoughts, other ideas of what could be done with this, or nah not needed.
The text was updated successfully, but these errors were encountered: