account_id | earliest_period_start |
---|---|
ARKK | 2020-12-31 |
ARKW | 2020-12-31 |
ARKF | 2020-12-31 |
ARKQ | 2020-12-31 |
ARKG | 2020-12-31 |
ARKX | 2020-12-31 |
Total 6 rows
ts | account_id | ticker | qty | price |
---|---|---|---|---|
2020-10-16 | ARKK | TSLA | 2466031 | 439.67 |
2020-10-20 | ARKK | TSLA | 18992 | 421.94 |
2020-10-21 | ARKK | TSLA | 2374 | 422.64 |
2020-10-22 | ARKK | TSLA | 7122 | 425.79 |
2020-10-23 | ARKK | TSLA | 7122 | 420.63 |
2020-10-27 | ARKK | TSLA | 1187 | 424.68 |
2020-10-28 | ARKK | TSLA | 4748 | 406.02 |
2020-10-29 | ARKK | TSLA | 14244 | 410.83 |
2020-11-02 | ARKK | TSLA | 3561 | 400.51 |
2020-11-03 | ARKK | TSLA | -151615 | 423.9 |
Total 88459 rows
account_id | d | ticker | qty |
---|---|---|---|
ARKK | 2020-09-30 | TSLA | 0 |
ARKK | 2020-12-31 | TSLA | 2660439 |
ARKK | 2021-03-31 | TSLA | 3757949 |
ARKK | 2021-06-30 | TSLA | 3566520 |
ARKK | 2021-09-30 | TSLA | 2545118 |
ARKK | 2021-12-31 | TSLA | 1198876 |
ARKK | 2022-03-31 | TSLA | 1094098 |
ARKK | 2022-06-30 | TSLA | 1023093 |
ARKK | 2022-09-30 | TSLA | 2927507 |
ARKK | 2022-12-31 | TSLA | 0 |
Total 4300 rows
{ "1_read_txns": { "type": "file_table", "desc": "Load txns from csv", "explicit_run_only": true, "r": { "urls": [ "{dir_in}/txns.csv" ], "csv": { "hdr_line_idx": 0, "first_data_line_idx": 1 }, "columns": { "col_ts": { "csv": { "col_hdr": "ts" }, "col_type": "string" }, "col_account_id": { "csv": { "col_hdr": "account_id" }, "col_type": "string" }, "col_ticker": { "csv": { "col_hdr": "ticker" }, "col_type": "string" }, "col_qty": { "csv": { "col_hdr": "qty", "col_format": "%d" }, "col_type": "int" }, "col_price": { "csv": { "col_hdr": "price", "col_format": "%f" }, "col_type": "float" } } }, "w": { "name": "txns", "having": "w.ts > \"{period_start_eod}\" && w.ts <= \"{period_end_eod}\"", "fields": { "account_id": { "expression": "r.col_account_id", "type": "string" }, "ts": { "expression": "r.col_ts", "type": "string" }, "txn_json": { "expression": "strings.ReplaceAll(fmt.Sprintf(`{'ts':'%s','t':'%s','q':%d,'p':%s}`, r.col_ts, r.col_ticker, r.col_qty, decimal2(r.col_price)), `'`,`\"`)", "type": "string" } }, "indexes": { "idx_txns_account_id": "non_unique(account_id)" } } } }
rowid | account_id | batch_idx | ts | txn_json |
---|---|---|---|---|
6094664611844062359 | ARKW | 0 | 2021-04-14 | {"ts":"2021-04-14","t":"FSLY","q":1532,"p":71.92} |
8537883289672171463 | ARKF | 0 | 2022-02-03 | {"ts":"2022-02-03","t":"SNAP","q":-933,"p":24.5} |
2749076004491469954 | ARKQ | 0 | 2021-11-12 | {"ts":"2021-11-12","t":"BIDU","q":-368,"p":170.57} |
7445773725017646389 | ARKK | 0 | 2021-05-07 | {"ts":"2021-05-07","t":"TWLO","q":37128,"p":307.15} |
8993784235489443377 | ARKK | 0 | 2021-11-12 | {"ts":"2021-11-12","t":"SKLZ","q":-26172,"p":12.5} |
206487046063108640 | ARKW | 0 | 2022-09-20 | {"ts":"2022-09-20","t":"NNDM","q":-3,"p":2.45} |
3354548830737968360 | ARKG | 0 | 2022-10-20 | {"ts":"2022-10-20","t":"ONVO","q":896,"p":1.71} |
8851154163572220846 | ARKQ | 0 | 2022-10-28 | {"ts":"2022-10-28","t":"AVAV","q":-1166,"p":90.14} |
151913958205174664 | ARKG | 0 | 2021-05-04 | {"ts":"2021-05-04","t":"GH","q":-7216,"p":148.19} |
8571157745347545844 | ARKK | 0 | 2021-12-29 | {"ts":"2021-12-29","t":"HOOD","q":-43488,"p":17.11} |
Total 79487 rows
{ "1_read_accounts": { "type": "file_table", "desc": "Load accounts from csv", "explicit_run_only": true, "r": { "urls": [ "{dir_in}/accounts.csv" ], "csv": { "hdr_line_idx": 0, "first_data_line_idx": 1 }, "columns": { "col_account_id": { "csv": { "col_hdr": "account_id" }, "col_type": "string" }, "col_earliest_period_start": { "csv": { "col_hdr": "earliest_period_start" }, "col_type": "string" } } }, "w": { "name": "accounts", "having": "w.earliest_period_start <= \"{period_start_eod}\"", "fields": { "account_id": { "expression": "r.col_account_id", "type": "string" }, "earliest_period_start": { "expression": "r.col_earliest_period_start", "type": "string" } } } } }
rowid | account_id | batch_idx | earliest_period_start |
---|---|---|---|
748401470040242660 | ARKK | 0 | 2020-12-31 |
6621936461880082804 | ARKF | 0 | 2020-12-31 |
1522209384545663127 | ARKW | 0 | 2020-12-31 |
2380715082357295080 | ARKG | 0 | 2020-12-31 |
5559895917703115577 | ARKQ | 0 | 2020-12-31 |
6520205207003275793 | ARKX | 0 | 2020-12-31 |
Total 6 rows
{ "1_read_period_holdings": { "type": "file_table", "desc": "Load holdings from csv", "explicit_run_only": true, "r": { "urls": [ "{dir_in}/holdings.csv" ], "csv": { "hdr_line_idx": 0, "first_data_line_idx": 1 }, "columns": { "col_eod": { "csv": { "col_hdr": "d" }, "col_type": "string" }, "col_account_id": { "csv": { "col_hdr": "account_id" }, "col_type": "string" }, "col_ticker": { "csv": { "col_hdr": "ticker" }, "col_type": "string" }, "col_qty": { "csv": { "col_hdr": "qty", "col_format": "%d" }, "col_type": "int" } } }, "w": { "name": "period_holdings", "having": "\"{period_start_eod}\" <= w.eod && w.eod <= \"{period_end_eod}\"", "fields": { "account_id": { "expression": "r.col_account_id", "type": "string" }, "eod": { "expression": "r.col_eod", "type": "string" }, "holding_json": { "expression": "fmt.Sprintf(`{\"d\":\"%s\",\"t\":\"%s\",\"q\":%d}`, r.col_eod, r.col_ticker, r.col_qty)", "type": "string" } }, "indexes": { "idx_period_holdings_account_id": "non_unique(account_id)" } } } }
rowid | account_id | batch_idx | eod | holding_json |
---|---|---|---|---|
523927006809746992 | ARKW | 0 | 2022-03-31 | {"d":"2022-03-31","t":"PLTR","q":50} |
7964715912605789246 | ARKW | 0 | 2022-06-30 | {"d":"2022-06-30","t":"VCYT","q":962271} |
7321126894636851304 | ARKK | 0 | 2022-03-31 | {"d":"2022-03-31","t":"IRDM","q":913} |
159541754259824109 | ARKK | 0 | 2021-06-30 | {"d":"2021-06-30","t":"PACB","q":6470871} |
3147847123612473758 | ARKG | 0 | 2021-06-30 | {"d":"2021-06-30","t":"TXG","q":1114540} |
6088195109262281354 | ARKW | 0 | 2021-03-31 | {"d":"2021-03-31","t":"SNAP","q":1293117} |
3371442508833222747 | ARKQ | 0 | 2021-06-30 | {"d":"2021-06-30","t":"ADSK","q":119} |
8119438770895972412 | ARKF | 0 | 2022-12-31 | {"d":"2022-12-31","t":"3690","q":0} |
760021395079726942 | ARKF | 0 | 2021-12-31 | {"d":"2021-12-31","t":"6060","q":6081} |
464401136269549803 | ARKG | 0 | 2022-12-31 | {"d":"2022-12-31","t":"SYRS","q":0} |
Total 3914 rows
{ "2_account_txns_outer": { "type": "table_lookup_table", "desc": "For each account, merge all txns into single json string", "r": { "table": "accounts", "expected_batches_total": 10 }, "l": { "index_name": "idx_txns_account_id", "join_on": "r.account_id", "group": true, "join_type": "left" }, "w": { "name": "account_txns", "fields": { "account_id": { "expression": "r.account_id", "type": "string" }, "txns_json": { "expression": "string_agg(l.txn_json,\",\")", "type": "string" } } } } }
rowid | account_id | batch_idx | txns_json |
---|---|---|---|
7337640464596222089 | ARKX | 6 | {"ts":"2021-04-23","t":"AIR","q":-286,"p":119.13},{"ts":"2021-07-20","t":"AVAV","q":8887,"p":96.85}, ... total length 181595 |
3719903644314909584 | ARKF | 5 | {"ts":"2022-02-04","t":"Z","q":-2835,"p":48.94},{"ts":"2022-12-31","t":"IPOB","q":-872035,"p":29.5}, ... total length 481037 |
7773052335557492403 | ARKG | 5 | {"ts":"2022-05-10","t":"PSNL","q":86800,"p":4.4},{"ts":"2022-01-21","t":"IOVA","q":-15248,"p":13.96} ... total length 1084244 |
2948673979393982941 | ARKW | 5 | {"ts":"2021-05-28","t":"NFLX","q":-465,"p":502.81},{"ts":"2021-04-30","t":"PYPL","q":-34800,"p":262. ... total length 714787 |
4577965328217475423 | ARKK | 0 | {"ts":"2021-03-04","t":"SQ","q":266809,"p":218.41},{"ts":"2021-03-11","t":"SQ","q":120492,"p":241.72 ... total length 1011871 |
6410928427592534468 | ARKQ | 3 | {"ts":"2022-06-15","t":"AVAV","q":-38717,"p":83.61},{"ts":"2022-05-11","t":"SNPS","q":-117,"p":260.8 ... total length 563105 |
Total 6 rows
{ "2_account_period_holdings_outer": { "type": "table_lookup_table", "desc": "For each account, merge all holdings into single json string", "r": { "table": "accounts", "expected_batches_total": 10 }, "l": { "index_name": "idx_period_holdings_account_id", "join_on": "r.account_id", "group": true, "join_type": "left" }, "w": { "name": "account_period_holdings", "fields": { "account_id": { "expression": "r.account_id", "type": "string" }, "holdings_json": { "expression": "string_agg(l.holding_json,\",\")", "type": "string" } }, "indexes": { "idx_account_period_holdings_account_id": "unique(account_id)" } } } }
rowid | account_id | batch_idx | holdings_json |
---|---|---|---|
3798263933557717806 | ARKF | 5 | {"d":"2022-06-30","t":"ROKU","q":0},{"d":"2022-06-30","t":"BABA","q":200},{"d":"2021-06-30","t":"HDB ... total length 25305 |
2297870030956086858 | ARKK | 0 | {"d":"2022-12-31","t":"PATH","q":0},{"d":"2022-12-31","t":"MTLS","q":0},{"d":"2021-03-31","t":"COIN" ... total length 28246 |
6490459023829990771 | ARKX | 6 | {"d":"2021-06-30","t":"XLNX","q":17088},{"d":"2022-03-31","t":"GOOG","q":2899},{"d":"2021-06-30","t" ... total length 17095 |
7126461419439144862 | ARKW | 5 | {"d":"2022-03-31","t":"FTCH","q":101},{"d":"2021-06-30","t":"JD","q":1452974},{"d":"2022-03-31","t": ... total length 29139 |
5291018643877674808 | ARKQ | 3 | {"d":"2021-12-31","t":"ROK","q":1248},{"d":"2022-12-31","t":"WKHS","q":0},{"d":"2022-06-30","t":"ISR ... total length 23268 |
3073048863807356155 | ARKG | 5 | {"d":"2022-03-31","t":"CLLS","q":606},{"d":"2021-03-31","t":"PRME","q":0},{"d":"2020-12-31","t":"PHR ... total length 30734 |
Total 6 rows
{ "3_build_account_period_activity": { "type": "table_lookup_table", "desc": "For each account, merge holdings and txns", "r": { "table": "account_txns", "expected_batches_total": 10 }, "l": { "index_name": "idx_account_period_holdings_account_id", "join_on": "r.account_id", "group": false, "join_type": "left" }, "w": { "name": "account_period_activity", "fields": { "account_id": { "expression": "r.account_id", "type": "string" }, "txns_json": { "expression": " \"[\" + r.txns_json + \"]\" ", "type": "string" }, "holdings_json": { "expression": " \"[\" + l.holdings_json + \"]\" ", "type": "string" } } } } }
rowid | account_id | batch_idx | holdings_json | txns_json |
---|---|---|---|---|
2832510643465443886 | ARKW | 6 | [{"d":"2022-03-31","t":"FTCH","q":101},{"d":"2021-06-30","t":"JD","q":1452974},{"d":"2022-03-31","t" ... total length 29141 | [{"ts":"2021-05-28","t":"NFLX","q":-465,"p":502.81},{"ts":"2021-04-30","t":"PYPL","q":-34800,"p":262 ... total length 714789 |
8724188995369700700 | ARKQ | 9 | [{"d":"2021-12-31","t":"ROK","q":1248},{"d":"2022-12-31","t":"WKHS","q":0},{"d":"2022-06-30","t":"IS ... total length 23270 | [{"ts":"2022-06-15","t":"AVAV","q":-38717,"p":83.61},{"ts":"2022-05-11","t":"SNPS","q":-117,"p":260. ... total length 563107 |
3797016840160679147 | ARKX | 1 | [{"d":"2021-06-30","t":"XLNX","q":17088},{"d":"2022-03-31","t":"GOOG","q":2899},{"d":"2021-06-30","t ... total length 17097 | [{"ts":"2021-04-23","t":"AIR","q":-286,"p":119.13},{"ts":"2021-07-20","t":"AVAV","q":8887,"p":96.85} ... total length 181597 |
6149240839756633886 | ARKK | 4 | [{"d":"2022-12-31","t":"PATH","q":0},{"d":"2022-12-31","t":"MTLS","q":0},{"d":"2021-03-31","t":"COIN ... total length 28248 | [{"ts":"2021-03-04","t":"SQ","q":266809,"p":218.41},{"ts":"2021-03-11","t":"SQ","q":120492,"p":241.7 ... total length 1011873 |
1335953350070866378 | ARKF | 2 | [{"d":"2022-06-30","t":"ROKU","q":0},{"d":"2022-06-30","t":"BABA","q":200},{"d":"2021-06-30","t":"HD ... total length 25307 | [{"ts":"2022-02-04","t":"Z","q":-2835,"p":48.94},{"ts":"2022-12-31","t":"IPOB","q":-872035,"p":29.5} ... total length 481039 |
1945457872909272069 | ARKG | 8 | [{"d":"2022-03-31","t":"CLLS","q":606},{"d":"2021-03-31","t":"PRME","q":0},{"d":"2020-12-31","t":"PH ... total length 30736 | [{"ts":"2022-05-10","t":"PSNL","q":86800,"p":4.4},{"ts":"2022-01-21","t":"IOVA","q":-15248,"p":13.96 ... total length 1084246 |
Total 6 rows
{ "4_calc_account_period_perf": { "type": "table_custom_tfm_table", "custom_proc_type": "py_calc", "desc": "Apply Python-based calculations to account holdings and txns", "r": { "table": "account_period_activity", "expected_batches_total": 10 }, "p": { "python_code_urls": [ "{dir_py}/portfolio_test_company_info_provider.py", "{dir_py}/portfolio_test_eod_price_provider.py", "{dir_py}/portfolio_calc.py" ], "calculated_fields": { "perf_json": { "expression": "txns_and_holdings_to_twr_cagr_by_sector_year_quarter_json(\"{period_start_eod}\", \"{period_end_eod}\", r.holdings_json, r.txns_json, PortfolioTestEodPriceProvider, PortfolioTestCompanyInfoProvider)", "type": "string" } } }, "w": { "name": "account_period_perf", "fields": { "account_id": { "expression": "r.account_id", "type": "string" }, "perf_json": { "expression": "p.perf_json", "type": "string" } } } } }
rowid | account_id | batch_idx | perf_json |
---|---|---|---|
6887364451659257268 | ARKF | 6 | {"2021": {"All": {"cagr": -0.1912, "twr": -0.1912}, "Communication Services": {"cagr": -0.4067, "twr ... total length 4679 |
5754198081589614465 | ARKK | 6 | {"2021": {"All": {"cagr": -0.2398, "twr": -0.2398}, "Communication Services": {"cagr": -0.3183, "twr ... total length 4731 |
32049402890064872 | ARKW | 3 | {"2021": {"All": {"cagr": -0.1949, "twr": -0.1949}, "Communication Services": {"cagr": -0.293, "twr" ... total length 4758 |
4248855088935145245 | ARKQ | 9 | {"2021": {"All": {"cagr": -0.0152, "twr": -0.0152}, "Communication Services": {"cagr": 0.062, "twr": ... total length 4674 |
8662263145276984767 | ARKX | 9 | {"2021": {"All": {"cagr": -0.1055, "twr": -0.1055}, "Communication Services": {"cagr": 0.1719, "twr" ... total length 4544 |
1210483319197080237 | ARKG | 5 | {"2021": {"All": {"cagr": -0.3384, "twr": -0.3384}, "Communication Services": {"cagr": 0.1666, "twr" ... total length 4533 |
Total 6 rows
{ "5_tag_by_period": { "type": "table_custom_tfm_table", "custom_proc_type": "tag_and_denormalize", "desc": "Tag accounts by period name", "r": { "table": "account_period_perf", "expected_batches_total": 10 }, "p": { "tag_field_name": "period", "tag_criteria": { "2021": "re.MatchString(`\"2021\":`, r.perf_json)", "2021Q1": "re.MatchString(`\"2021Q1\":`, r.perf_json)", "2021Q2": "re.MatchString(`\"2021Q2\":`, r.perf_json)", "2021Q3": "re.MatchString(`\"2021Q3\":`, r.perf_json)", "2021Q4": "re.MatchString(`\"2021Q4\":`, r.perf_json)", "2022": "re.MatchString(`\"2022\":`, r.perf_json)", "2022Q1": "re.MatchString(`\"2022Q1\":`, r.perf_json)", "2022Q2": "re.MatchString(`\"2022Q2\":`, r.perf_json)", "2022Q3": "re.MatchString(`\"2022Q3\":`, r.perf_json)", "2022Q4": "re.MatchString(`\"2022Q4\":`, r.perf_json)" } }, "w": { "name": "account_period_perf_by_period", "fields": { "period": { "expression": "p.period", "type": "string" }, "account_id": { "expression": "r.account_id", "type": "string" }, "perf_json": { "expression": "r.perf_json", "type": "string" } } } } }
rowid | account_id | batch_idx | perf_json | period |
---|---|---|---|---|
3812613906073144497 | ARKK | 7 | {"2021": {"All": {"cagr": -0.2398, "twr": -0.2398}, "Communication Services": {"cagr": -0.3183, "twr ... total length 4731 | 2022Q4 |
7276369387634914856 | ARKX | 4 | {"2021": {"All": {"cagr": -0.1055, "twr": -0.1055}, "Communication Services": {"cagr": 0.1719, "twr" ... total length 4544 | 2021Q3 |
6738115215161291018 | ARKW | 0 | {"2021": {"All": {"cagr": -0.1949, "twr": -0.1949}, "Communication Services": {"cagr": -0.293, "twr" ... total length 4758 | 2022Q2 |
7605309852895153944 | ARKG | 6 | {"2021": {"All": {"cagr": -0.3384, "twr": -0.3384}, "Communication Services": {"cagr": 0.1666, "twr" ... total length 4533 | 2021Q1 |
1922480560878025461 | ARKF | 2 | {"2021": {"All": {"cagr": -0.1912, "twr": -0.1912}, "Communication Services": {"cagr": -0.4067, "twr ... total length 4679 | 2022Q3 |
7092756260584728207 | ARKK | 7 | {"2021": {"All": {"cagr": -0.2398, "twr": -0.2398}, "Communication Services": {"cagr": -0.3183, "twr ... total length 4731 | 2021 |
4467122228499360750 | ARKG | 6 | {"2021": {"All": {"cagr": -0.3384, "twr": -0.3384}, "Communication Services": {"cagr": 0.1666, "twr" ... total length 4533 | 2021 |
6162316215288009881 | ARKX | 4 | {"2021": {"All": {"cagr": -0.1055, "twr": -0.1055}, "Communication Services": {"cagr": 0.1719, "twr" ... total length 4544 | 2021Q2 |
1759821806393733334 | ARKF | 2 | {"2021": {"All": {"cagr": -0.1912, "twr": -0.1912}, "Communication Services": {"cagr": -0.4067, "twr ... total length 4679 | 2021Q2 |
3848238608544572988 | ARKW | 0 | {"2021": {"All": {"cagr": -0.1949, "twr": -0.1949}, "Communication Services": {"cagr": -0.293, "twr" ... total length 4758 | 2022Q4 |
Total 60 rows
{ "5_tag_by_sector": { "type": "table_custom_tfm_table", "custom_proc_type": "tag_and_denormalize", "desc": "Tag accounts by sector", "r": { "table": "account_period_perf_by_period", "expected_batches_total": 10 }, "p": { "tag_field_name": "sector", "tag_criteria": { "All": "re.MatchString(`\"All\":`, r.perf_json)", "Communication Services": "re.MatchString(`\"Communication Services\":`, r.perf_json)", "Consumer Cyclical": "re.MatchString(`\"Consumer Cyclical\":`, r.perf_json)", "Consumer Defensive": "re.MatchString(`\"Consumer Defensive\":`, r.perf_json)", "Financial Services": "re.MatchString(`\"Financial Services\":`, r.perf_json)", "Healthcare": "re.MatchString(`\"Healthcare\":`, r.perf_json)", "Industrials": "re.MatchString(`\"Industrials\":`, r.perf_json)", "Real Estate": "re.MatchString(`\"Real Estate\":`, r.perf_json)", "Technology": "re.MatchString(`\"Technology\":`, r.perf_json)" } }, "w": { "name": "account_period_perf_by_period_sector", "fields": { "period": { "expression": "r.period", "type": "string" }, "sector": { "expression": "p.sector", "type": "string" }, "account_id": { "expression": "r.account_id", "type": "string" }, "perf_json": { "expression": "r.perf_json", "type": "string" } } } } }
rowid | account_id | batch_idx | perf_json | period | sector |
---|---|---|---|---|---|
4880353688536716330 | ARKX | 7 | {"2021": {"All": {"cagr": -0.1055, "twr": -0.1055}, "Communication Services": {"cagr": 0.1719, "twr" ... total length 4544 | 2022Q3 | All |
5966907642021688353 | ARKG | 2 | {"2021": {"All": {"cagr": -0.3384, "twr": -0.3384}, "Communication Services": {"cagr": 0.1666, "twr" ... total length 4533 | 2021Q2 | Communication Services |
216345607086265348 | ARKW | 5 | {"2021": {"All": {"cagr": -0.1949, "twr": -0.1949}, "Communication Services": {"cagr": -0.293, "twr" ... total length 4758 | 2021Q3 | Financial Services |
444465478572115389 | ARKW | 9 | {"2021": {"All": {"cagr": -0.1949, "twr": -0.1949}, "Communication Services": {"cagr": -0.293, "twr" ... total length 4758 | 2022Q1 | Industrials |
4655715813499361957 | ARKK | 9 | {"2021": {"All": {"cagr": -0.2398, "twr": -0.2398}, "Communication Services": {"cagr": -0.3183, "twr ... total length 4731 | 2022Q1 | Financial Services |
3105771363861377355 | ARKQ | 6 | {"2021": {"All": {"cagr": -0.0152, "twr": -0.0152}, "Communication Services": {"cagr": 0.062, "twr": ... total length 4674 | 2021Q1 | Consumer Defensive |
1473264958443625609 | ARKK | 2 | {"2021": {"All": {"cagr": -0.2398, "twr": -0.2398}, "Communication Services": {"cagr": -0.3183, "twr ... total length 4731 | 2022Q4 | Technology |
4441230069590019727 | ARKX | 0 | {"2021": {"All": {"cagr": -0.1055, "twr": -0.1055}, "Communication Services": {"cagr": 0.1719, "twr" ... total length 4544 | 2021Q2 | Communication Services |
347198857808667031 | ARKG | 3 | {"2021": {"All": {"cagr": -0.3384, "twr": -0.3384}, "Communication Services": {"cagr": 0.1666, "twr" ... total length 4533 | 2022Q3 | All |
5194216653932103424 | ARKK | 5 | {"2021": {"All": {"cagr": -0.2398, "twr": -0.2398}, "Communication Services": {"cagr": -0.3183, "twr ... total length 4731 | 2022Q2 | Healthcare |
Total 540 rows
{ "6_perf_json_to_columns": { "type": "table_custom_tfm_table", "custom_proc_type": "py_calc", "desc": "Use Python to read perf json and save stats as columns", "r": { "table": "account_period_perf_by_period_sector", "expected_batches_total": 100 }, "p": { "python_code_urls": [ "{dir_py}/json_to_columns.py" ], "calculated_fields": { "twr": { "expression": "json_to_twr(r.perf_json, r.period, r.sector)", "type": "float" }, "cagr": { "expression": "json_to_cagr(r.perf_json, r.period, r.sector)", "type": "float" } } }, "w": { "name": "account_period_sector_twr_cagr", "fields": { "account_id": { "expression": "r.account_id", "type": "string" }, "period": { "expression": "r.period", "type": "string" }, "sector": { "expression": "r.sector", "type": "string" }, "twr": { "expression": "p.twr", "type": "float" }, "cagr": { "expression": "p.cagr", "type": "float" } } } } }
rowid | account_id | batch_idx | cagr | period | sector | twr |
---|---|---|---|---|---|---|
2051940333335580608 | ARKF | 30 | -42.3 | 2022Q4 | Communication Services | -12.94 |
467099065024923780 | ARKG | 16 | -66.06 | 2022Q1 | All | -23.39 |
4793009141456092103 | ARKK | 42 | -85.25 | 2022Q2 | Communication Services | -37.95 |
1668642860725665609 | ARKG | 50 | -2.49 | 2022Q2 | Communication Services | -0.63 |
4172230767046282068 | ARKF | 63 | -69.22 | 2021Q4 | Communication Services | -25.69 |
3320490046305540588 | ARKQ | 91 | -32.86 | 2021Q1 | Healthcare | -9.36 |
6384236349569128686 | ARKW | 37 | 22.25 | 2022Q4 | Healthcare | 5.19 |
3902626804003825458 | ARKG | 32 | -1.75 | 2022Q2 | Financial Services | -0.44 |
2059833829580478020 | ARKQ | 37 | 1.73 | 2021 | Technology | 1.73 |
4830284743586419631 | ARKQ | 12 | -73.12 | 2022Q3 | Consumer Cyclical | -28.19 |
Total 540 rows
{ "7_file_account_period_sector_perf": { "type": "table_file", "desc": "Write yearly/quarterly perf results by sector to CSV file", "r": { "table": "account_period_sector_twr_cagr" }, "w": { "top": { "order": "account_id,period,sector" }, "url_template": "{dir_out}/account_period_sector_perf.csv", "columns": [ { "csv": { "header": "ARK fund", "format": "%s" }, "name": "account_id", "expression": "r.account_id", "type": "string" }, { "csv": { "header": "Period", "format": "%s" }, "name": "period", "expression": "r.period", "type": "string" }, { "csv": { "header": "Sector", "format": "%s" }, "name": "sector", "expression": "r.sector", "type": "string" }, { "csv": { "header": "Time-weighted annualized return %", "format": "%.2f" }, "name": "cagr", "expression": "r.cagr", "type": "float" } ] } } }
ARK fund | Period | Sector | Time-weighted annualized return % |
---|---|---|---|
ARKF | 2021 | All | -19.12 |
ARKF | 2021 | Communication Services | -40.67 |
ARKF | 2021 | Consumer Cyclical | -22.28 |
ARKF | 2021 | Consumer Defensive | 0.00 |
ARKF | 2021 | Financial Services | 16.53 |
ARKF | 2021 | Healthcare | -55.78 |
ARKF | 2021 | Industrials | -14.41 |
ARKF | 2021 | Real Estate | -44.99 |
ARKF | 2021 | Technology | -17.33 |
ARKF | 2021Q1 | All | 176.50 |
Total 540 rows
{ "7_file_account_year_perf": { "type": "table_file", "desc": "Write yearly perf results for all sectors to CSV file", "r": { "table": "account_period_sector_twr_cagr" }, "w": { "top": { "order": "account_id,period" }, "having": "len(w.period) == 4 && w.sector == \"All\"", "url_template": "{dir_out}/account_year_perf.csv", "columns": [ { "csv": { "header": "ARK fund", "format": "%s" }, "name": "account_id", "expression": "r.account_id", "type": "string" }, { "csv": { "header": "Period", "format": "%s" }, "name": "period", "expression": "r.period", "type": "string" }, { "csv": { "header": "Sector", "format": "%s" }, "name": "sector", "expression": "r.sector", "type": "string" }, { "csv": { "header": "Time-weighted annualized return %", "format": "%.2f" }, "name": "cagr", "expression": "r.cagr", "type": "float" } ] } } }
ARK fund | Period | Sector | Time-weighted annualized return % |
---|---|---|---|
ARKF | 2021 | All | -19.12 |
ARKF | 2022 | All | -63.35 |
ARKG | 2021 | All | -33.84 |
ARKG | 2022 | All | -50.87 |
ARKK | 2021 | All | -23.98 |
ARKK | 2022 | All | -68.07 |
ARKQ | 2021 | All | -1.52 |
ARKQ | 2022 | All | -61.45 |
ARKW | 2021 | All | -19.49 |
ARKW | 2022 | All | -65.28 |
Total 12 rows