WLM1ke / poptimizer

Оптимизация долгосрочного портфеля акций
The Unlicense
154 stars 28 forks source link

'Doc' object has no attribute 'genotype' #53

Closed RomaKoks closed 3 years ago

RomaKoks commented 3 years ago

Внезапно появилась такая ошибка и "накрутила" всем побед. Какие меры мне лучше предпринять?

{"t":{"$date":"2021-04-06T13:24:33.059+03:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"} {"t":{"$date":"2021-04-06T13:24:33.061+03:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"} {"t":{"$date":"2021-04-06T13:24:33.062+03:00"},"s":"I", "c":"NETWORK", "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."} {"t":{"$date":"2021-04-06T13:24:33.062+03:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":748,"port":27017,"dbPath":"PATH_TO/poptimizer/db","architecture":"64-bit","host":"iRU"}} {"t":{"$date":"2021-04-06T13:24:33.062+03:00"},"s":"I", "c":"CONTROL", "id":23398, "ctx":"initandlisten","msg":"Target operating system minimum version","attr":{"targetMinOS":"Windows 7/Windows Server 2008 R2"}} {"t":{"$date":"2021-04-06T13:24:33.062+03:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.0","gitVersion":"563487e100c4215e2dce98d0af2a6a5a2d67c5cf","modules":[],"allocator":"tcmalloc","environment":{"distmod":"windows","distarch":"x86_64","target_arch":"x86_64"}}}} {"t":{"$date":"2021-04-06T13:24:33.062+03:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Microsoft Windows 10","version":"10.0 (build 19042)"}}} {"t":{"$date":"2021-04-06T13:24:33.062+03:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"net":{"bindIp":"localhost"},"storage":{"dbPath":"PATH_TO\poptimizer\db","directoryPerDB":true}}}} {"t":{"$date":"2021-04-06T13:24:33.069+03:00"},"s":"I", "c":"STORAGE", "id":22270, "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"PATH_TO/poptimizer/db","storageEngine":"wiredTiger"}} {"t":{"$date":"2021-04-06T13:24:33.069+03:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=15820M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}} {"t":{"$date":"2021-04-06T13:24:33.088+03:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1617704673:88162][748:140703820895568], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 457 through 458"}} {"t":{"$date":"2021-04-06T13:24:33.136+03:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1617704673:136034][748:140703820895568], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 458 through 458"}} {"t":{"$date":"2021-04-06T13:24:33.181+03:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1617704673:180914][748:140703820895568], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Main recovery loop: starting at 457/222080 to 458/256"}} {"t":{"$date":"2021-04-06T13:24:33.263+03:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1617704673:263693][748:140703820895568], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 457 through 458"}} {"t":{"$date":"2021-04-06T13:24:33.320+03:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1617704673:320541][748:140703820895568], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 458 through 458"}} {"t":{"$date":"2021-04-06T13:24:33.363+03:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1617704673:363426][748:140703820895568], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global recovery timestamp: (0, 0)"}} {"t":{"$date":"2021-04-06T13:24:33.375+03:00"},"s":"I", "c":"STORAGE", "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":306}} {"t":{"$date":"2021-04-06T13:24:33.375+03:00"},"s":"I", "c":"RECOVERY", "id":23987, "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}} {"t":{"$date":"2021-04-06T13:24:33.377+03:00"},"s":"I", "c":"STORAGE", "id":22262, "ctx":"initandlisten","msg":"Timestamp monitor starting"} {"t":{"$date":"2021-04-06T13:24:33.378+03:00"},"s":"W", "c":"CONTROL", "id":22120, "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]} {"t":{"$date":"2021-04-06T13:24:33.381+03:00"},"s":"I", "c":"STORAGE", "id":20536, "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"} {"t":{"$date":"2021-04-06T13:24:33.546+03:00"},"s":"W", "c":"FTDC", "id":23718, "ctx":"initandlisten","msg":"Failed to initialize Performance Counters for FTDC","attr":{"error":{"code":179,"codeName":"WindowsPdhError","errmsg":"PdhExpandCounterPathW failed with 'Указанные объекты не найдены на этом компьютере.' for counter '\Processor(_Total)\% Idle Time'"}}} {"t":{"$date":"2021-04-06T13:24:33.546+03:00"},"s":"I", "c":"FTDC", "id":20625, "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"PATH_TO/poptimizer/db/diagnostic.data"}} {"t":{"$date":"2021-04-06T13:24:33.548+03:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"127.0.0.1"}} {"t":{"$date":"2021-04-06T13:24:33.548+03:00"},"s":"I", "c":"NETWORK", "id":23016, "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}} INFO:EventBus:AppStarted(timestamp=datetime.datetime(2021, 4, 6, 10, 24, 34, 635047)) Forecasts: 17it [00:23, 1.39s/it] Traceback (most recent call last): File "PATH_TO\poptimizer\poptimizer\evolve\store.py", line 48, in get return data_dict[self._name] KeyError: 'genotype'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "PATH_TO\poptimizer\loop.py", line 13, in opt optimize(date) File "PATH_TO\poptimizer\poptimizer__main__.py", line 30, in optimize opt = Optimizer(port) File "PATH_TO\poptimizer\poptimizer\portfolio\optimizer.py", line 36, in init self._metrics = metrics.MetricsResample(portfolio) File "PATH_TO\poptimizer\poptimizer\portfolio\metrics.py", line 138, in init for forecast in evolve.get_forecasts(tickers, date): File "PATH_TO\poptimizer\poptimizer\evolve\forecaster.py", line 69, in get_forecasts forecasts = Forecasts(tickers, date) File "PATH_TO\poptimizer\poptimizer\evolve\forecaster.py", line 29, in init forecast = organism.forecast(tickers, date) File "PATH_TO\poptimizer\poptimizer\evolve\population.py", line 139, in forecast model = Model(tickers, end, self.genotype.get_phenotype(), pickled_model) File "PATH_TO\poptimizer\poptimizer\evolve\population.py", line 47, in genotype return self._data.genotype File "PATH_TO\poptimizer\poptimizer\evolve\store.py", line 50, in get raise AttributeError(f"'{owner.name}' object has no attribute {error}") AttributeError: 'Doc' object has no attribute 'genotype' NOW is 2021-04-06 13:24:59.426034 Имеется 100 организмов из 100

2021-04-05: Шаг переоценки существующих организмов - 1/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 282895 Data: {'batch_size': 129.11398996479213, 'history_days': 37.015207014300145, 'ticker_on': 1.4961829685606562, 'day_of_year_on': -1.3184921148222324, 'day_of_period_on': -0.3581207837799719, 'prices_on': 2.9821826510974634, 'dividends_on': -1.218817060144394, 'turnover_on': 0.914842380640876, 'average_turnover_on': -0.699126762530033, 'rvi_on': -2.792763447791985, 'mcftrr_on': -1.93265326300987, 'imoex_on': -5.306833839096052, 'ticker_type_on': -3.339556376347452, 'usd_on': -2.0302456959424413, 'open_on': 2.377407126067244} Model: {'start_bn': -2.170820364329111, 'kernels': 1.2304203372717688, 'sub_blocks': 1.0165487399288449, 'gate_channels': 3.655193907692617, 'residual_channels': 3.110450587130084, 'skip_channels': 3.6009756675600033, 'end_channels': 12.543127189713942} Optimizer: {'betas': 0.9989469716669452, 'eps': 9.990772823439389e-09, 'weight_decay': 0.009851862286420794} Scheduler: {'max_lr': 0.008438415665195705, 'epochs': 0.9942368141030508, 'pct_start': 0.30569184948124123, 'anneal_strategy': 1.1834934807741755, 'base_momentum': 0.8543202286943965, 'max_momentum': 0.9501062028416284, 'div_factor': 24.872879360917633, 'final_div_factor': 10594.662867350402} LLH: 1.0127 Timer: 34

2021-04-05: Шаг переоценки существующих организмов - 2/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 283266 Data: {'batch_size': 130.71316719246317, 'history_days': 45.254623552239096, 'ticker_on': 4.414210986145641, 'day_of_year_on': -3.162958601682031, 'day_of_period_on': 1.408086465864079, 'prices_on': 3.43601163648374, 'dividends_on': 0.8990273569914335, 'turnover_on': 1.2812019467955387, 'average_turnover_on': -0.5149759332821369, 'rvi_on': -6.835235543125595, 'mcftrr_on': -1.2141754347540386, 'imoex_on': 0.8270908692909673, 'ticker_type_on': -0.45949887305703196, 'usd_on': 1.749619114397614, 'open_on': 0.8941885000762019} Model: {'start_bn': -0.14486289430410093, 'kernels': 2.3093182631129996, 'sub_blocks': 1.3869500871513922, 'gate_channels': 3.8775953733659234, 'residual_channels': 3.8575443778678387, 'skip_channels': 4.313933338601139, 'end_channels': 8.859915011287493} Optimizer: {'betas': 0.9989802718243128, 'eps': 9.97206879489969e-09, 'weight_decay': 0.009973884393479118} Scheduler: {'max_lr': 0.01175190008029012, 'epochs': 0.9917025866227448, 'pct_start': 0.29579159180383385, 'anneal_strategy': 1.138798664510326, 'base_momentum': 0.8549236452613173, 'max_momentum': 0.9524465372866897, 'div_factor': 25.212607987459382, 'final_div_factor': 9872.104572793327} LLH: 1.0109 Timer: 51

2021-04-05: Шаг переоценки существующих организмов - 3/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 283232 Data: {'batch_size': 129.14643040318686, 'history_days': 54.50594029150181, 'ticker_on': 2.115290052257728, 'day_of_year_on': -0.605611354736193, 'day_of_period_on': -0.8520918255997714, 'prices_on': 1.6323379506740474, 'dividends_on': -0.3279877259664346, 'turnover_on': 1.2664755935505292, 'average_turnover_on': -0.7406823893061762, 'rvi_on': -1.1590445449003424, 'mcftrr_on': -0.3492122657367346, 'imoex_on': -2.89406703917413, 'ticker_type_on': -1.3013872878613275, 'usd_on': -0.7449143409561085, 'open_on': 0.6925362788889224} Model: {'start_bn': -0.4717546217081192, 'kernels': 2.183638757726063, 'sub_blocks': 1.1323090645053433, 'gate_channels': 5.280161228661479, 'residual_channels': 4.217797691082319, 'skip_channels': 4.239420257019827, 'end_channels': 8.506476109331658} Optimizer: {'betas': 0.9989834591232805, 'eps': 9.994310399452697e-09, 'weight_decay': 0.01007220385406504} Scheduler: {'max_lr': 0.007764736034557539, 'epochs': 1.0000526529820437, 'pct_start': 0.30321315779622576, 'anneal_strategy': -0.8663086938527101, 'base_momentum': 0.8515211468352687, 'max_momentum': 0.9461697684068386, 'div_factor': 24.562424675016622, 'final_div_factor': 10067.283703884208} LLH: 1.0079 Timer: 30

2021-04-05: Шаг переоценки существующих организмов - 4/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 283316 Data: {'batch_size': 127.3890773382612, 'history_days': 35.297505822749606, 'ticker_on': 2.804127796026597, 'day_of_year_on': -0.9359065818905388, 'day_of_period_on': -1.0395959466803584, 'prices_on': 1.6323379506740474, 'dividends_on': -0.3279877259664346, 'turnover_on': 1.1471947724675142, 'average_turnover_on': -0.16509257766528385, 'rvi_on': -4.568702974814391, 'mcftrr_on': -0.4989881291618443, 'imoex_on': -2.89406703917413, 'ticker_type_on': -1.0103945596892876, 'usd_on': -0.9229464056875802, 'open_on': 0.6925362788889224} Model: {'start_bn': 0.48476424269648216, 'kernels': 3.5617878436362433, 'sub_blocks': 1.2593684197709267, 'gate_channels': 3.0315556948935356, 'residual_channels': 5.82514672195885, 'skip_channels': 5.096100627824891, 'end_channels': 8.506476109331658} Optimizer: {'betas': 0.9990019691432226, 'eps': 9.977581253256297e-09, 'weight_decay': 0.009981105321278523} Scheduler: {'max_lr': 0.0036661261806283756, 'epochs': 0.9994436809991594, 'pct_start': 0.30291731203982464, 'anneal_strategy': -0.43525336483691457, 'base_momentum': 0.8487618611039887, 'max_momentum': 0.9552621810907912, 'div_factor': 24.92997399906494, 'final_div_factor': 9935.61692246235} LLH: 1.0077 Timer: 33

2021-04-05: Шаг переоценки существующих организмов - 5/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 283221 Data: {'batch_size': 129.5487944564173, 'history_days': 32.36127680856102, 'ticker_on': 0.7011247282330246, 'day_of_year_on': -1.857850553183083, 'day_of_period_on': 1.4195213570117273, 'prices_on': 0.6964216386220465, 'dividends_on': -1.153634625953878, 'turnover_on': 2.1102497474778406, 'average_turnover_on': -3.1913740055639495, 'rvi_on': -2.5393398074285485, 'mcftrr_on': -4.69851087964688, 'imoex_on': -3.104498844510889, 'ticker_type_on': -0.05772789379846566, 'usd_on': -0.8680799383593495, 'open_on': -0.6190260639010782} Model: {'start_bn': 0.7557948842868958, 'kernels': 2.584219888776984, 'sub_blocks': 1.3561183949595448, 'gate_channels': 3.18883626383162, 'residual_channels': 5.300472732305459, 'skip_channels': 4.75163379239307, 'end_channels': 10.611426433296922} Optimizer: {'betas': 0.9989841633358855, 'eps': 9.977691237490357e-09, 'weight_decay': 0.010072505024148722} Scheduler: {'max_lr': 0.02854526387104548, 'epochs': 1.0018595658098304, 'pct_start': 0.2999523000194047, 'anneal_strategy': 0.8365494562790383, 'base_momentum': 0.8489453360449295, 'max_momentum': 0.9539226049209667, 'div_factor': 24.887657226441803, 'final_div_factor': 10481.752750294121} LLH: 1.0045 Timer: 29

2021-04-05: Шаг переоценки существующих организмов - 6/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 283264 Data: {'batch_size': 124.21062605176519, 'history_days': 32.67785817149473, 'ticker_on': 1.3060997077503325, 'day_of_year_on': -7.936433292459158, 'day_of_period_on': 2.060009238765374, 'prices_on': 1.9148294054983712, 'dividends_on': 2.6038430925449703, 'turnover_on': 1.4819486657028693, 'average_turnover_on': -1.8464205620187308, 'rvi_on': -6.602621776577463, 'mcftrr_on': -1.7546778704878725, 'imoex_on': -0.4755212965667067, 'ticker_type_on': -1.0996231793309064, 'usd_on': 2.1194544077971615, 'open_on': 1.9804186477453523} Model: {'start_bn': -1.5651408192057843, 'kernels': 3.6605500750289717, 'sub_blocks': 1.4072307553497114, 'gate_channels': 4.855084404400753, 'residual_channels': 4.326888841913921, 'skip_channels': 5.788781656780704, 'end_channels': 7.469472088956564} Optimizer: {'betas': 0.9990311787852406, 'eps': 9.988894574332353e-09, 'weight_decay': 0.010091130670425842} Scheduler: {'max_lr': 0.027795188069731806, 'epochs': 0.9967358598507899, 'pct_start': 0.29886806636072116, 'anneal_strategy': -0.9397714362228164, 'base_momentum': 0.84913177441488, 'max_momentum': 0.9572537007436318, 'div_factor': 25.07582657094894, 'final_div_factor': 10552.913826574493} LLH: 1.0027 Timer: 45

2021-04-05: Шаг переоценки существующих организмов - 7/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 283337 Data: {'batch_size': 129.11398996479213, 'history_days': 43.29744444905284, 'ticker_on': 0.735412176157566, 'day_of_year_on': -1.557348897095807, 'day_of_period_on': -0.3581207837799719, 'prices_on': 0.6002072410011461, 'dividends_on': 1.532254271286333, 'turnover_on': 2.334680820809848, 'average_turnover_on': -0.699126762530033, 'rvi_on': -2.792763447791985, 'mcftrr_on': -1.93265326300987, 'imoex_on': -1.60552005974125, 'ticker_type_on': -0.4156808853894721, 'usd_on': -0.344491486165805, 'open_on': 1.6349581093280006} Model: {'start_bn': -1.7040348988448693, 'kernels': 2.783507604278526, 'sub_blocks': 1.1950114355829806, 'gate_channels': 4.745658473792522, 'residual_channels': 4.146579751612516, 'skip_channels': 4.436116925717199, 'end_channels': 12.543127189713942} Optimizer: {'betas': 0.9989637727531835, 'eps': 9.990772823439389e-09, 'weight_decay': 0.010169437865328644} Scheduler: {'max_lr': 0.008438415665195705, 'epochs': 0.9951716403269572, 'pct_start': 0.30236494392487, 'anneal_strategy': 1.8304205574661059, 'base_momentum': 0.8527166703274321, 'max_momentum': 0.9466437535961111, 'div_factor': 24.724676788284086, 'final_div_factor': 10080.827151780597} LLH: 0.9998 Timer: 37

2021-04-05: Шаг переоценки существующих организмов - 8/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 283574 Data: {'batch_size': 127.49862615207198, 'history_days': 51.73668384768355, 'ticker_on': 1.6668398265693205, 'day_of_year_on': -2.104375905901345, 'day_of_period_on': 0.04797090715941338, 'prices_on': 2.8019867245624948, 'dividends_on': 1.2010200611503368, 'turnover_on': 0.8563418456881949, 'average_turnover_on': 0.3390305390974662, 'rvi_on': -2.1128372471109405, 'mcftrr_on': -1.230338548465791, 'imoex_on': -1.578237345982047, 'ticker_type_on': -1.7271048289836193, 'usd_on': -0.10131940210631403, 'open_on': 2.2762163613346527} Model: {'start_bn': -0.12199213957494909, 'kernels': 2.285662196403919, 'sub_blocks': 1.2230820979811132, 'gate_channels': 3.2806968717556853, 'residual_channels': 3.616627605518013, 'skip_channels': 4.415009367881208, 'end_channels': 6.553571494928423} Optimizer: {'betas': 0.998998952856435, 'eps': 9.97161216448502e-09, 'weight_decay': 0.01004943288181694} Scheduler: {'max_lr': 0.02681743387930703, 'epochs': 0.9989498885224218, 'pct_start': 0.300482004619608, 'anneal_strategy': -0.034917066508703076, 'base_momentum': 0.8542522503715722, 'max_momentum': 0.9516106331592764, 'div_factor': 24.436444158148685, 'final_div_factor': 10237.05214805306} LLH: 0.9969 Timer: 39

2021-04-05: Шаг переоценки существующих организмов - 9/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 283854 Data: {'batch_size': 131.7136368739434, 'history_days': 32.20042114567875, 'ticker_on': 1.2026228332380475, 'day_of_year_on': -1.7204774542706809, 'day_of_period_on': -1.262185962559439, 'prices_on': 1.2131344308186114, 'dividends_on': 1.6341928782411455, 'turnover_on': 0.6764887695329795, 'average_turnover_on': -0.23209959524970836, 'rvi_on': -2.6445266787475883, 'mcftrr_on': -4.104668521341506, 'imoex_on': -1.0946394188163844, 'ticker_type_on': 2.0057922750462263, 'usd_on': -1.919167917482044, 'open_on': -2.4146226127606893} Model: {'start_bn': -1.7040348988448693, 'kernels': 2.5750853981289055, 'sub_blocks': 1.2278142469968878, 'gate_channels': 3.693980601755917, 'residual_channels': 3.7063630006197155, 'skip_channels': 4.063800033496327, 'end_channels': 12.543127189713942} Optimizer: {'betas': 0.9990227337594352, 'eps': 1.0060624238616954e-08, 'weight_decay': 0.010208150886727793} Scheduler: {'max_lr': 0.019806999084712333, 'epochs': 0.9876311874452565, 'pct_start': 0.29928579068225475, 'anneal_strategy': -0.7489924140354225, 'base_momentum': 0.8485622740061275, 'max_momentum': 0.9526890035830102, 'div_factor': 24.3989712333599, 'final_div_factor': 9888.659764290083} LLH: 0.9958 Timer: 30

2021-04-05: Шаг переоценки существующих организмов - 10/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 284086 Data: {'batch_size': 127.17356135002618, 'history_days': 38.125731599994666, 'ticker_on': 1.0709456448978822, 'day_of_year_on': -2.3298473772626394, 'day_of_period_on': 0.4527593332187303, 'prices_on': 1.6290063743667915, 'dividends_on': 1.1396869976768111, 'turnover_on': 0.8126634506060731, 'average_turnover_on': -1.0820504558139223, 'rvi_on': -0.40665114711689354, 'mcftrr_on': 1.0722365273559096, 'imoex_on': -2.6127075396767814, 'ticker_type_on': -1.7466876629796155, 'usd_on': -1.244601353580486, 'open_on': 0.7032420333172618} Model: {'start_bn': -1.1953885845219354, 'kernels': 1.9628285614808827, 'sub_blocks': 1.2096970640967675, 'gate_channels': 4.149128095154571, 'residual_channels': 4.40043979610523, 'skip_channels': 4.072633926779601, 'end_channels': 6.911928494344707} Optimizer: {'betas': 0.9989747330989738, 'eps': 9.965976651810387e-09, 'weight_decay': 0.010136475921371771} Scheduler: {'max_lr': 0.02089162150903083, 'epochs': 0.9924477811966503, 'pct_start': 0.3030005207746779, 'anneal_strategy': 0.493977283368806, 'base_momentum': 0.8519067460302696, 'max_momentum': 0.9513717801768419, 'div_factor': 25.285776742919897, 'final_div_factor': 10281.722280226806} LLH: 0.9954 Timer: 46

2021-04-05: Шаг переоценки существующих организмов - 11/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 284636 Data: {'batch_size': 132.09895965625606, 'history_days': 37.94209432123361, 'ticker_on': 3.9198905889472524, 'day_of_year_on': -2.3615728185797966, 'day_of_period_on': 2.1500001370097377, 'prices_on': 0.7851002444870305, 'dividends_on': 0.34894018552039696, 'turnover_on': 0.05049546602830868, 'average_turnover_on': -0.41393985043823145, 'rvi_on': -1.2308050372675108, 'mcftrr_on': -6.75195231977609, 'imoex_on': -0.18592898779016886, 'ticker_type_on': 0.9742815695233601, 'usd_on': 2.13706085368269, 'open_on': -3.5382062808082666} Model: {'start_bn': 3.0008226183831015, 'kernels': 3.426055906780645, 'sub_blocks': 1.3282073148928848, 'gate_channels': 5.861725774349978, 'residual_channels': 5.156465439482679, 'skip_channels': 5.546817024471426, 'end_channels': 10.161418182618414} Optimizer: {'betas': 0.9990218556415129, 'eps': 1.0038378058617539e-08, 'weight_decay': 0.010111874343043106} Scheduler: {'max_lr': 0.02657908619908253, 'epochs': 0.9987220155975899, 'pct_start': 0.29485364473079284, 'anneal_strategy': 2.4786462105162306, 'base_momentum': 0.8547921377195049, 'max_momentum': 0.9505139957854383, 'div_factor': 24.70007035729723, 'final_div_factor': 10232.242537969347} LLH: 0.9942 Timer: 43

2021-04-05: Шаг переоценки существующих организмов - 12/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 284937 Data: {'batch_size': 129.06413826957555, 'history_days': 48.411970887829845, 'ticker_on': 1.185883239521181, 'day_of_year_on': -3.1161282031870736, 'day_of_period_on': -0.12978014889844874, 'prices_on': 2.8844185841578764, 'dividends_on': 0.13215395456730664, 'turnover_on': 1.4572986265779178, 'average_turnover_on': -1.6838949023006808, 'rvi_on': -3.2377957588186073, 'mcftrr_on': -1.7065778676110945, 'imoex_on': -5.538660309379201, 'ticker_type_on': 0.9423668463756475, 'usd_on': -0.5677760330728062, 'open_on': 2.7595291638017825} Model: {'start_bn': -0.009889836379681965, 'kernels': 2.9382256501335324, 'sub_blocks': 1.113612418952892, 'gate_channels': 4.444970526990106, 'residual_channels': 3.7496116552604772, 'skip_channels': 4.399243510403746, 'end_channels': 8.093747138719504} Optimizer: {'betas': 0.9989834414597125, 'eps': 9.958269634578969e-09, 'weight_decay': 0.010034420549575863} Scheduler: {'max_lr': 0.014894741340022515, 'epochs': 0.9945015447909407, 'pct_start': 0.3004539977445932, 'anneal_strategy': 0.4021360233671351, 'base_momentum': 0.8514024131701574, 'max_momentum': 0.9581642259761585, 'div_factor': 25.138310729911666, 'final_div_factor': 10247.648300695622} LLH: 0.9940 Timer: 36

2021-04-05: Шаг переоценки существующих организмов - 13/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 285189 Data: {'batch_size': 129.61500214665156, 'history_days': 55.31868831412401, 'ticker_on': 0.931404936842664, 'day_of_year_on': -3.638659870481857, 'day_of_period_on': 1.4078050556191406, 'prices_on': 2.1910137188916474, 'dividends_on': 0.11498553075282236, 'turnover_on': 1.9454675354678514, 'average_turnover_on': -0.6676346129338598, 'rvi_on': -4.772375470636296, 'mcftrr_on': -1.4855613793562803, 'imoex_on': -1.6268119573030444, 'ticker_type_on': -0.2716349789855247, 'usd_on': 1.901268382316126, 'open_on': 0.8214387648272354} Model: {'start_bn': -0.8727644546676028, 'kernels': 2.7083244786339216, 'sub_blocks': 1.3815790453466792, 'gate_channels': 3.921986310255915, 'residual_channels': 3.548003770777458, 'skip_channels': 5.489351825152683, 'end_channels': 8.762312333954057} Optimizer: {'betas': 0.9989822687380243, 'eps': 9.978709315399259e-09, 'weight_decay': 0.010122757605364196} Scheduler: {'max_lr': 0.013021483486942823, 'epochs': 0.9955112438293735, 'pct_start': 0.29526694953823235, 'anneal_strategy': 1.9797802825050212, 'base_momentum': 0.8535224664921386, 'max_momentum': 0.957107346764789, 'div_factor': 25.567671388733405, 'final_div_factor': 9924.13915344965} LLH: 0.9937 Timer: 44

2021-04-05: Шаг переоценки существующих организмов - 14/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 285188 Data: {'batch_size': 125.56142942984138, 'history_days': 39.03428177378684, 'ticker_on': 1.0241321934227394, 'day_of_year_on': -8.773181388318761, 'day_of_period_on': 1.8233026915462622, 'prices_on': 2.3739640054458757, 'dividends_on': 1.7700724375538193, 'turnover_on': 0.4744135848107208, 'average_turnover_on': -1.3934578224900216, 'rvi_on': -6.717151175202348, 'mcftrr_on': -2.1573266534963085, 'imoex_on': -0.9478032880823322, 'ticker_type_on': -0.057849855565923036, 'usd_on': 2.2371891465696234, 'open_on': 0.6906769315788238} Model: {'start_bn': -1.1502211731323875, 'kernels': 3.171661850173492, 'sub_blocks': 1.380012963264939, 'gate_channels': 4.409707262282689, 'residual_channels': 4.717634654952425, 'skip_channels': 5.0383045057230955, 'end_channels': 8.327922381265513} Optimizer: {'betas': 0.9990035902743758, 'eps': 9.980403015094026e-09, 'weight_decay': 0.010063787039953098} Scheduler: {'max_lr': 0.02670206855767571, 'epochs': 0.9955391912587991, 'pct_start': 0.2988314343863867, 'anneal_strategy': -0.292902107633636, 'base_momentum': 0.8480438759048313, 'max_momentum': 0.9590899362627602, 'div_factor': 25.556593046976428, 'final_div_factor': 10034.32162597855} LLH: 0.9936 Timer: 47

2021-04-05: Шаг переоценки существующих организмов - 15/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 285356 Data: {'batch_size': 124.14288731919436, 'history_days': 35.2783702088608, 'ticker_on': 0.4760106640175248, 'day_of_year_on': -9.327063242868723, 'day_of_period_on': 1.2689905103448793, 'prices_on': 3.0554795554437213, 'dividends_on': 2.7695848176814932, 'turnover_on': 0.029861897297741913, 'average_turnover_on': -0.6851659544431169, 'rvi_on': -2.6445266787475883, 'mcftrr_on': -4.104668521341506, 'imoex_on': -1.5976359820568033, 'ticker_type_on': 3.546322596962837, 'usd_on': -0.7369311155721017, 'open_on': 3.6692192094297926} Model: {'start_bn': 1.5700899378755133, 'kernels': 3.816654544582109, 'sub_blocks': 1.2438965334796046, 'gate_channels': 6.745644303700853, 'residual_channels': 3.580647864175917, 'skip_channels': 4.063800033496327, 'end_channels': 11.1768826215664} Optimizer: {'betas': 0.9990324187105801, 'eps': 9.998723180249824e-09, 'weight_decay': 0.009993970944875015} Scheduler: {'max_lr': 0.03565489868375743, 'epochs': 0.9832781980468731, 'pct_start': 0.29859567262437514, 'anneal_strategy': 0.15671900518369952, 'base_momentum': 0.8570873641030302, 'max_momentum': 0.9562006268497444, 'div_factor': 23.914192282824015, 'final_div_factor': 9716.059387251045} LLH: 0.9935 Timer: 40

2021-04-05: Шаг переоценки существующих организмов - 16/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 285540 Data: {'batch_size': 128.16606046388947, 'history_days': 30.928971409826925, 'ticker_on': 1.9782511811771557, 'day_of_year_on': -3.266398071242293, 'day_of_period_on': -0.38931533660365814, 'prices_on': 2.2065510451931667, 'dividends_on': 0.06841875958225627, 'turnover_on': 1.403049420665596, 'average_turnover_on': -0.7076719892046817, 'rvi_on': -4.568702974814391, 'mcftrr_on': -2.0428598261369526, 'imoex_on': -5.240053886752641, 'ticker_type_on': -1.0103945596892876, 'usd_on': -0.5051735246868357, 'open_on': 1.2252659762885214} Model: {'start_bn': -1.0518595772471402, 'kernels': 1.8777499668839939, 'sub_blocks': 1.1752107252908797, 'gate_channels': 3.8001687776109114, 'residual_channels': 3.668155571431715, 'skip_channels': 5.403237349032759, 'end_channels': 8.209692915692491} Optimizer: {'betas': 0.9989695464307408, 'eps': 9.995859268415831e-09, 'weight_decay': 0.009981105321278523} Scheduler: {'max_lr': 0.018645541159247676, 'epochs': 0.9994436809991594, 'pct_start': 0.3020645250449366, 'anneal_strategy': 0.4240996795127956, 'base_momentum': 0.8487618611039887, 'max_momentum': 0.9542086806491754, 'div_factor': 25.040189519820228, 'final_div_factor': 10205.296970918454} LLH: 0.9928 Timer: 34

2021-04-05: Шаг переоценки существующих организмов - 17/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285541

Родитель: Побед - 285541 Data: {'batch_size': 128.02451740493672, 'history_days': 74.90270576456544, 'ticker_on': 1.2423475420476409, 'day_of_year_on': -0.5404438350947776, 'day_of_period_on': -0.026814566664855405, 'prices_on': 1.9766172547706324, 'dividends_on': 0.36968902430741085, 'turnover_on': 0.4398467489715099, 'average_turnover_on': 0.8447546511404818, 'rvi_on': -1.0906776772540918, 'mcftrr_on': -0.2469610066229145, 'imoex_on': -2.2318207233287284, 'ticker_type_on': -0.7982001712992459, 'usd_on': -0.8769582965798767, 'open_on': 0.7374743491927982} Model: {'start_bn': -0.26689366888959487, 'kernels': 2.17314783525574, 'sub_blocks': 1.2702420526026488, 'gate_channels': 4.691816784873492, 'residual_channels': 4.548800728206341, 'skip_channels': 5.66065097256378, 'end_channels': 5.118295201407214} Optimizer: {'betas': 0.9990029166402363, 'eps': 9.99986981424181e-09, 'weight_decay': 0.010071213431929597} Scheduler: {'max_lr': 0.006487685225365178, 'epochs': 1.0012833521263194, 'pct_start': 0.3007243366993013, 'anneal_strategy': 0.5026070320339392, 'base_momentum': 0.850864336790906, 'max_momentum': 0.9520295726343669, 'div_factor': 25.027491866892902, 'final_div_factor': 10148.252966746757} LLH: 0.9928 Timer: 39

2021-04-05: Шаг переоценки существующих организмов - 18/100 LLH - (0.9165, 0.9678, 1.0127) Максимум побед - 285542

Родитель: Побед - 16 'Doc' object has no attribute 'genotype' Traceback (most recent call last): File "PATH_TO\poptimizer\poptimizer\evolve\store.py", line 48, in get return data_dict[self._name] KeyError: 'genotype'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "PATH_TO\poptimizer\loop.py", line 29, in evolve() File "PATH_TO\poptimizer\poptimizer__main__.py", line 19, in evolve ev.evolve(port) File "PATH_TO\poptimizer\poptimizer\evolve\evolve.py", line 42, in evolve self._eval_exiting(portfolio) File "PATH_TO\poptimizer\poptimizer\evolve\evolve.py", line 98, in _eval_exiting parent_fitness = self._eval_and_print(parent, tickers, end) File "PATH_TO\poptimizer\poptimizer\evolve\evolve.py", line 112, in _eval_and_print print(organism) File "PATH_TO\poptimizer\poptimizer\evolve\population.py", line 37, in str return str(self._data.genotype) File "PATH_TO\poptimizer\poptimizer\evolve\store.py", line 50, in get raise AttributeError(f"'{owner.name}' object has no attribute {error}") AttributeError: 'Doc' object has no attribute 'genotype'

Process finished with exit code 0

WLM1ke commented 3 years ago

Насколько я понимаю у вас по какой-то странной причине есть запись в базе без генотипа (как такое произошло мне до конца не ясно). Нужно постараться найти ее и удалить.

Не очень понял, что у вас произошло — как ошибка накрутила победы? Вроде при ошибке должно все просто упасть и программа остановиться. Само количество побед большой роли не играет — оно больше для понимания сколько итераций в среднем проживает организм. Потихоньку текущие организмы вымрут, а у новых количество побед будет нормальным.

RomaKoks commented 3 years ago

Да, я тоже не понял, возможно, процесс был неудачно убит. Спасибо!