Title: 示例代码中应该要过滤一下univ中不在quantos中分配策略标的范围中的标的 · Issue #2 · quantOS-org/quantOSUserGuide · GitHub
Open Graph Title: 示例代码中应该要过滤一下univ中不在quantos中分配策略标的范围中的标的 · Issue #2 · quantOS-org/quantOSUserGuide
X Title: 示例代码中应该要过滤一下univ中不在quantos中分配策略标的范围中的标的 · Issue #2 · quantOS-org/quantOSUserGuide
Description: def _to_valide_goals(self, goals_raw): #goals_raw =基于投资范围以及策略选出来的标的 #univ =quantos分配的策略标的 univ, msg = self.ctx.trade_api.query_universe() univ.loc[:, 'size'] = 0.0 univ.loc[:, 'ref_price'] = 0.0 univ = univ.set_index('security').sort_ind...
Open Graph Description: def _to_valide_goals(self, goals_raw): #goals_raw =基于投资范围以及策略选出来的标的 #univ =quantos分配的策略标的 univ, msg = self.ctx.trade_api.query_universe() univ.loc[:, 'size'] = 0.0 univ.loc[:, 'ref_price'] = 0.0 un...
X Description: def _to_valide_goals(self, goals_raw): #goals_raw =基于投资范围以及策略选出来的标的 #univ =quantos分配的策略标的 univ, msg = self.ctx.trade_api.query_universe() univ.loc[:, 'size'] = 0.0 univ.loc[:, 'ref_pric...
Opengraph URL: https://github.com/quantOS-org/quantOSUserGuide/issues/2
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"示例代码中应该要过滤一下univ中不在quantos中分配策略标的范围中的标的","articleBody":" def _to_valide_goals(self, goals_raw):\r\n #goals_raw =基于投资范围以及策略选出来的标的\r\n #univ =quantos分配的策略标的\r\n univ, msg = self.ctx.trade_api.query_universe()\r\n univ.loc[:, 'size'] = 0.0\r\n univ.loc[:, 'ref_price'] = 0.0\r\n univ = univ.set_index('security').sort_index(axis=0)\r\n univ = univ[['size', 'ref_price']]\r\n for d in goals_raw:\r\n symbol = d['symbol']\r\n size = d['size']\r\n # TODO: better method needed\r\n if symbol in univ.index and symbol in self.univ_price_dic:\r\n univ.loc[symbol, 'ref_price'] = self.univ_price_dic[symbol]['last']\r\n if size \u003e 0:\r\n univ.loc[symbol, 'size'] = size\r\n univ = univ[univ['size']\u003e0] #add by geekgu\r\n goals_valid = list(univ.reset_index().to_dict(orient='index').values())\r\n return goals_valid","author":{"url":"https://github.com/geekgu","@type":"Person","name":"geekgu"},"datePublished":"2018-03-06T07:07:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2/quantOSUserGuide/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8da8f47f-85fb-0e0a-06c7-156f1ea634b1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8784:3B590F:F3665B:141ED27:69717812 |
| html-safe-nonce | 8e73571696367c9d22d2d5c0cbe28e8785e4d3ede18f9ebfe31f3b5958098e2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Nzg0OjNCNTkwRjpGMzY2NUI6MTQxRUQyNzo2OTcxNzgxMiIsInZpc2l0b3JfaWQiOiIzMjM3MTkxMDk5ODYzODg5OTM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 138c35dcad46606c97295749a09eb6d9932e9e95ceb817ca7a5a444c1c7ad249 |
| hovercard-subject-tag | issue:302587137 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/quantOS-org/quantOSUserGuide/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/757b8b1d87bd99f09fe4b056aa5714989b94467597193d2cad11a20bd30e747a/quantOS-org/quantOSUserGuide/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/757b8b1d87bd99f09fe4b056aa5714989b94467597193d2cad11a20bd30e747a/quantOS-org/quantOSUserGuide/issues/2 |
| og:image:alt | def _to_valide_goals(self, goals_raw): #goals_raw =基于投资范围以及策略选出来的标的 #univ =quantos分配的策略标的 univ, msg = self.ctx.trade_api.query_universe() univ.loc[:, 'size'] = 0.0 univ.loc[:, 'ref_price'] = 0.0 un... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | geekgu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 102ab681b33bed6a87d35dc54dd8200470d7e01648f08979e84415ab67d611aa |
| turbo-cache-control | no-preview |
| go-import | github.com/quantOS-org/quantOSUserGuide git https://github.com/quantOS-org/quantOSUserGuide.git |
| octolytics-dimension-user_id | 32634706 |
| octolytics-dimension-user_login | quantOS-org |
| octolytics-dimension-repository_id | 112409587 |
| octolytics-dimension-repository_nwo | quantOS-org/quantOSUserGuide |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 112409587 |
| octolytics-dimension-repository_network_root_nwo | quantOS-org/quantOSUserGuide |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a660b76f271bda19afb9f5242b473bfee637a5a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width