ç¹å®ã®ã»ãã¥ãªãã£ã®æææš©ãåçãçã¿åºããã®ãããããšãåã«æ倱ãšå€±æãçã¿åºããã®ããã©ã®ããã«å€æããŸãã
ïŒåºå žïŒ
ãã®èšäºã§ã¯ã調æŽãããæ䟡蚌åžã®è²¡åçµæãç¹å®ããŠèŠèŠåããæ¹æ³ã説æããŸãã
ã¯ã©ã€ã¢ã³ãã¬ããŒãOpening Brokerã®äŸã䜿çšããŠãæ ªåŒåžå Žã®èšŒåžã¬ããŒãã®è§£æãšçµ±åãæ€èšããã¯ã©ãŠãã¬ããŒãã·ã¹ãã ã®ã¢ãŒããã¯ãã£ãæ§ç¯ããŠãAWS Quicksightã§ç°¡åã§äŸ¿å©ãªåæãè¡ããŸãã
ã¿ã¹ã¯ã®èª¬æ
å€ãã®ãã¬ãŒãã³ã°ãšæè²ã®ã¬ãã¹ã³ã¯ããã¬ãŒããŒã®ãžã£ãŒãã«ã®å¿ èŠæ§ã«ã€ããŠæããŠãããŸãããã¬ãŒããŒã®ãžã£ãŒãã«ã§ã¯ããããªãåæãšååŒæŠç¥ã®èŠçŽã®ããã«ããã¹ãŠã®ååŒãã©ã¡ãŒã¿ãŒãèšé²ãããŸãã ãã®ååŒæã§ã®åãçµã¿ã«ããããã¬ãŒããŒãéããæèãé«ããããšãã§ããŸãããéå±ãªããã»ã¹ã«ç²ããããšããããŸãã
æåã¯ãžã£ãŒããªã³ã°ã®ã¢ããã€ã¹ã«ã泚ææ·±ãåŸããåãã©ã³ã¶ã¯ã·ã§ã³ããã®ãã©ã¡ãŒã¿ãŒã§ExcelããŒãã«ã«çŽ°å¿ã®æ³šæãæã£ãŠæžããã¬ããŒãããµããªãŒãã£ãŒããèšç»ãããå°æ¥ã®ãã©ã³ã¶ã¯ã·ã§ã³ãäœæããŸããããããã«ç²ããŸããã
ãã¬ãŒããŒã®æ¥èšãæåã§ä¿æããã®ãäžäŸ¿ãªã®ã¯ãªãã§ããïŒ
- ãžã£ãŒãã«ã®æåå å¡«ïŒãã¬ãŒãã£ã³ã°ã¿ãŒããã«ããæ¯æ¥ã®ååŒãã¢ã³ããŒããã圢ã§ã®éšåçãªèªååã䜿çšããå Žåã§ãïŒããã«ç²ããŸãã
- æåã§å ¥åãããšãšã©ãŒãŸãã¯ã¿ã€ããã¹ã®ãªã¹ã¯ãé«ããªããŸãã
- ã¢ã¯ãã£ããªãã¬ãŒããŒãããã·ããªæè³å®¶ã«ãªãããã®éèªã«ã©ãã©ãæ»ã£ãŠããŠããããå®å šã«å¿ããŠããŸãããšããããŸãïŒç§ã®å ŽåïŒã æåŸã«
- ããã°ã©ãã³ã°ã§ããã®ã§ãããã掻çšããŠããã»ã¹å šäœãèªååããŠã¿ãŸãããïŒ ãããè¡ããïŒ
å€ãã®å Žåã蚌åžäŒç€Ÿã¯ãé¢å¿ã®ããã»ãŒãã¹ãŠã®åé¡ã«ã€ããŠããªãé«å質ã®åæãã¯ã©ã€ã¢ã³ãã«æäŸãããã€ãã¯çµç¹ã§ãã ãã®ã¬ããŒãã¯æŽæ°ããšã«æ¹åãããŠãããšèšã£ãŠãéèšã§ã¯ãããŸããããæãé«åºŠãªãã®ã§ãã£ãŠããèŠæ±ã®å€ãã奜å¥å¿customersçãªé¡§å®¢ãèŠããã«ã¹ã¿ãã€ãºãçµ±åããªãå ŽåããããŸãã
ããšãã°ãOpening Brokerã䜿çšãããšãå人å£åº§ã§XML圢åŒã®èšŒåžååŒã¬ããŒããåãåãããšãã§ããŸãããã¢ã¹ã¯ã¯èšŒåžååŒæïŒMOEXïŒã«IIAãšéåžžã®èšŒåžå£åº§ãããå Žåããããã¯2ã€ã®ç°ãªãã¬ããŒãã«ãªããŸãã Petersburg Stock ExchangeïŒSPBïŒãæåã®2ã€ã¯ãã1ã€è¿œå ããŸãã
åèšã§ãçµ±åãããæè³å®¶ã®ãžã£ãŒãã«ãåãåãããã«ã¯ãXML圢åŒã®3ã€ã®ãã¡ã€ã«ãåŠçããå¿ èŠããããŸãã
åè¿°ã®MOEXãšSPBã®ã¬ããŒãã¯åœ¢åŒããããã«ç°ãªããããããŒã¿ãããã³ã°ãå®è£ ããããã»ã¹ã§èæ ®ããå¿ èŠããããŸãã
éçºäžã®ã·ã¹ãã ã®ã¢ãŒããã¯ãã£
次ã®å³ã¯ãéçºäžã®ã·ã¹ãã ã®ã¢ãŒããã¯ãã£ã¢ãã«ã瀺ããŠããŸãã
ããŒãµãŒã®å®è£
å人ã¢ã«ãŠã³ãã®3ã€ã®ã¢ã«ãŠã³ããã¹ãŠã«ã€ããŠãå¯èœãªéãæ倧ã®æéïŒå幎ã«è€æ°ã®ã¬ããŒãã«åå²ã§ããŸãïŒã®ã¬ããŒããåãåããXML圢åŒã§ä¿åããŠ1ã€ã®ãã©ã«ããŒã«å ¥ããŸãã 調æ»ã®ãã¹ãããŒã¿ãšããŠãæ¶ç©ºã®ã¯ã©ã€ã¢ã³ãããŒããã©ãªãªã䜿çšããŸãããåžå Žã®çŸå®ã«å¯èœãªéãè¿ããã©ã¡ãŒã¿ãŒã䜿çšããŸãã
æ€èšäžã®æè³å®¶Xæ°ã5ã€ã®æ䟡蚌åžã®å°ããªããŒããã©ãªãªãæã£ãŠãããšä»®å®ããŸãã
- SPB亀æã«é¢ããã¬ããŒãã«ã¯ãAppleãšMicrosoftã®2ã€ã®ããŒããŒããããŸãã
- MOEX亀æïŒãããŒã«ãŒïŒã«é¢ããã¬ããŒãã«ã¯ãFGC UESãšãã1ã€ã®è«æãå«ãŸããŠããŸãã
- MOEXååŒæïŒIISïŒã®ã¬ããŒãã«ã¯ãMMKãšOFZ 24019ã®2ã€ã®èšŒåžãå«ãŸããŠããŸãã
5ã€ã®èšŒåžã«ãããšãè³Œå ¥/販売ãé åœã®æ¯æããã¯ãŒãã³ã®ååŒããããäŸ¡æ Œãå€ããå¯èœæ§ããããŸãã çŸåšã®ç¶æ³ãããªãã¡ããã¹ãŠã®æ¯æããååŒãããã³çŸåšã®åžå ŽäŸ¡å€ãèæ ®ãã財åçµæã確èªãããã®ã§ãã
ããã§Pythonãç»å Žãããã¹ãŠã®ã¬ããŒãã®æ å ±ã1ã€ã®é åã«èªã¿åããŸãã
my_files_list = [join('Data/', f) for f in listdir('Data/') if isfile(join('Data/', f))] my_xml_data = [] # for f in my_files_list: tree = ET.parse(f) root = tree.getroot() my_xml_data.append(root)
åæã®ããã«ãã¬ããŒãããããã€ãã®ãšã³ãã£ãã£ãå¿ èŠã§ãããµã³ãã«ãæºåããããã«ã4ã€ã®èŸæžã䜿çšããŠäžèšã®ã»ããã説æããŸãã
- ããŒããã©ãªãªå ã®èšŒåžã®ããžã·ã§ã³ã
- å®äºããååŒã
- éååŒæäœããã³ãã®ä»ã®ã¢ã«ãŠã³ãã®åãã
- ãªãŒãã³ããžã·ã§ã³ã®å¹³åäŸ¡æ Œ
dict_stocks = {'stock_name': [], 'account': [], 'currency': [], 'current_cost': [], 'current_cost_rub': [], 'saldo' : []} dict_deals = {'stock_name': [], 'account': [], 'date_oper': [], 'type_oper': [], 'quantity': [], 'price': [], 'currency': [], 'brokerage': [], 'result': []} dict_flows = {'stock_name': [], 'account': [], 'date_oper': [], 'type_oper': [], 'result': [], 'currency': []} dict_avg_price = {'stock_name': [], 'account': [], 'avg_open_price' : []}
ãããã®èŸæžãäœã§ãããã«ã€ããŠã®ããã€ãã®èšèã
èŸæždict_stocks
ããŒããã©ãªãªã«é¢ããäžè¬æ
å ±ãä¿åããã«ã¯ãdict_stocksèŸæžãå¿
èŠã§ãã
- çšçŽã®ååïŒstock_nameïŒ;
- ã¢ã«ãŠã³ãåïŒSPBãMOEX BROKãMOEX IISïŒïŒã¢ã«ãŠã³ãïŒ;
- æ¬æžã®æ±ºæžã«äœ¿çšãããé貚ïŒé貚ïŒ;
- çŸåšã®å€ïŒå人å£åº§éèšãããŒã«ãŒã§ã¬ããŒããçæããæç¹ïŒïŒcurrent_costïŒã ããã§ãç§ã¯ãèŠæ±ãå³ãã顧客ã«å¯ŸããŠã¯ãå°æ¥ããã«è¿œå ã®æ¹åãè¡ããååŒç«¯æ«ãŸãã¯å¯Ÿå¿ããååŒæã®ãŠã§ããµã€ãããã®ã»ãã¥ãªãã£èŠç©ããã®ââåçãªåä¿¡ã䜿çšããããšãã§ããŸãã
- ã¬ããŒããçæãããæç¹ã®ã»ãã¥ãªãã£ããžã·ã§ã³ã®çŸåšã®å€ïŒcurrent_cost_rubïŒ
äžèšã®é ç®ãšåæ§ã«ãããã§ã¯ãçŸåšã®æç¹ã§ã®äžå€®éè¡ã®ã¬ãŒããŸãã¯çºæ¿ã¬ãŒããå¿ èŠã«å¿ããŠååŸããããšãã§ããŸãã - æ䟡蚌åžã®çŸåšã®æ®é«ïŒsaldoïŒ
èŸæždict_deals
dict_dealsèŸæžã¯ãå®äºãããã©ã³ã¶ã¯ã·ã§ã³ã«é¢ãã次ã®æ
å ±ãä¿åããããã«å¿
èŠã§ãã
- çšçŽã®ååïŒstock_nameïŒ;
- ã¢ã«ãŠã³ãåïŒSPBãMOEX BROKãMOEX IISïŒïŒã¢ã«ãŠã³ãïŒ;
- ååŒæ¥ãããªãã¡ T0ïŒdate_operïŒ;
- æäœã®ã¿ã€ãïŒtype_operïŒ;
- ååŒã«åå ããŠãã蚌åžã®éïŒéïŒã
- ãã©ã³ã¶ã¯ã·ã§ã³ãå®è¡ãããäŸ¡æ ŒïŒäŸ¡æ ŒïŒã
- ãã©ã³ã¶ã¯ã·ã§ã³ãå®è¡ãããé貚ïŒé貚ïŒã
- ååŒã®ä»²ä»ææ°æïŒä»²ä»ïŒ;
- ãã©ã³ã¶ã¯ã·ã§ã³ã®è²¡åçµæïŒçµæïŒ
Dict_flowsèŸæž
dict_flowsãã£ã¯ã·ã§ããªã¯ãã¯ã©ã€ã¢ã³ãã¢ã«ãŠã³ãã®è³éã®åããåæ ãã次ã®æ
å ±ãæ ŒçŽããããã«äœ¿çšãããŸãã
- çšçŽã®ååïŒstock_nameïŒ;
- ã¢ã«ãŠã³ãåïŒSPBãMOEX BROKãMOEX IISïŒïŒã¢ã«ãŠã³ãïŒ;
- ååŒæ¥ãããªãã¡ T0ïŒdate_operïŒ;
- æäœã®ã¿ã€ãïŒtype_operïŒã ããã€ãã®å€ãåãããšãã§ããŸãïŒdivãNKDãtax;
- ãã©ã³ã¶ã¯ã·ã§ã³ãå®è¡ãããé貚ïŒé貚ïŒã
- æäœã®è²¡åçµæïŒçµæïŒ
èŸæždict_avg_price
dict_avg_priceèŸæžã¯ãåè«æã®å¹³å賌å
¥äŸ¡æ Œã®äŒèšæ
å ±ã«å¿
èŠã§ãã
- çšçŽã®ååïŒstock_nameïŒ;
- ã¢ã«ãŠã³ãåïŒSPBãMOEX BROKãMOEX IISïŒïŒã¢ã«ãŠã³ãïŒ;
- ãªãŒãã³ããžã·ã§ã³ã®å¹³åäŸ¡æ ŒïŒavg_open_priceïŒ
XMLããã¥ã¡ã³ãã®é åãåŠçãããããã®èŸæžã«é©åãªããŒã¿ãå ¥åããŸãã
# for XMLdata in my_xml_data: # exchange_name = 'SPB' if XMLdata.get('board_list') == ' ' else 'MOEX' client_code = XMLdata.get('client_code') account_name = get_account_name(exchange_name, client_code) # current_position, deals, flows, stock_name, \ saldo, ticketdate, price, brokerage, \ operationdate, currency, \ current_cost, current_cost_rub, \ stock_name_deal, payment_currency, currency_flows = get_allias(exchange_name) # get_briefcase(XMLdata) df_stocks = pd.DataFrame(dict_stocks) df_stocks.set_index("stock_name", drop = False, inplace = True) # get_deals(XMLdata) df_deals = pd.DataFrame(dict_deals) df_avg = pd.DataFrame(dict_avg_price) # get_nontrade_operation(XMLdata) df_flows = pd.DataFrame(dict_flows)
ãã¹ãŠã®åŠçã¯ãã¬ããŒãã®ãã¹ãŠã®XMLããŒã¿ã®ã«ãŒããééããŸãã ååŒãã©ãããã©ãŒã ã«é¢ããæ å ±ãã¯ã©ã€ã¢ã³ãã³ãŒãã¯ãã¹ãŠã®ã¬ããŒãã§åãã§ããããããããã³ã°ã䜿çšããã«åãã¿ã°ããå®å šã«æœåºã§ããŸãã
ãã ããã¬ããŒãïŒSPBãŸãã¯MOEXïŒã«åºã¥ããŠã¿ã°ã«å¿ èŠãªãšã€ãªã¢ã¹ãæäŸããç¹å¥ãªãã¶ã€ã³ã䜿çšããå¿ èŠããããŸãã ãããã®ã¬ããŒãã®æ§è³ªãåãããŒã¿ã¯ãç°ãªãæ¹æ³ã§åŒã³åºãããŸãã
ã¿ã°ã®äžäžèŽ
- SBPã¬ããŒãã®ãã©ã³ã¶ã¯ã·ã§ã³ã«å¯ŸãããããŒã«ãŒã®ã³ããã·ã§ã³ã¯ã brokerageã¿ã°ãšMOEXã¬ããŒã-broker_commissionã«ãããŸãã
- SPBã¬ããŒãã®éååŒå£åº§ååŒæ¥ã¯operationdateã§ãããMOEXã§ã¯ã operation_dateãªã©ã§ãã
ã¿ã°ãããã³ã°ã®äŸ
tags_mapping = { 'SPB': { 'current_position': 'briefcase_position', 'deals': 'closed_deal', 'flows': 'nontrade_money_operation', ... 'stock_name_deal': 'issuername', 'paymentcurrency': 'paymentcurrency', 'currency_flows': 'currencycode' }, 'MOEX': { 'current_position': 'spot_assets', 'deals': 'spot_main_deals_conclusion', 'flows': 'spot_non_trade_money_operations', ... 'stock_name_deal': 'security_name', 'paymentcurrency': 'price_currency_code', 'currency_flows': 'currency_code' } }
get_alliasé¢æ°ã¯ãååŒãã©ãããã©ãŒã ã®ååãå ¥åãšããŠãåŠçã«å¿ èŠãªã¿ã°ã®ååãè¿ããŸãã
GET_ALLIASãã¡ã³ã¯ã·ã§ã³
def get_allias(exchange_name): return( tags_mapping[exchange_name]['current_position'], tags_mapping[exchange_name]['deals'], tags_mapping[exchange_name]['flows'], ... tags_mapping[exchange_name]['stock_name_deal'], tags_mapping[exchange_name]['paymentcurrency'], tags_mapping[exchange_name]['currency_flows'] )
é¢æ°get_briefcaseã¯ãã¯ã©ã€ã¢ã³ãããŒããã©ãªãªã®ã¹ããŒã¿ã¹ã«é¢ããæ å ±ãåŠçããŸãã
GET_BRIEFCASEãã¡ã³ã¯ã·ã§ã³
def get_briefcase(XMLdata): # briefcase_position briefcase_position = XMLdata.find(current_position) if not briefcase_position: return try: for child in briefcase_position: stock_name_reduce = child.get(stock_name).upper() stock_name_reduce = re.sub('[,\.]|(\s?INC)|(\s+$)|([-\s]?)', '', stock_name_reduce) dict_stocks['stock_name'].append(stock_name_reduce) dict_stocks['account'].append(account_name) dict_stocks['currency'].append(child.get(currency)) dict_stocks['current_cost'].append(float(child.get(current_cost))) dict_stocks['current_cost_rub'].append(float(child.get(current_cost_rub))) dict_stocks['saldo'].append(float(child.get(saldo))) except Exception as e: print('get_briefcase --> Oops! It seems we have a BUG!', e)
次ã«ãget_dealsé¢æ°ã¯ãã©ã³ã¶ã¯ã·ã§ã³ã«é¢ããæ å ±ãååŸããŸãã
GET_DEALSé¢æ°
def get_deals(XMLdata): stock_name_proc = '' closed_deal = XMLdata.find(deals) if not closed_deal: return # SPB - , # MOEX: , # : if exchange_name == 'SPB': sortchildrenby(closed_deal, stock_name_deal) for child in closed_deal: sortchildrenby(child, stock_name_deal) try: for child in closed_deal: stock_name_reduce = child.get(stock_name_deal).upper() stock_name_reduce = re.sub('[,\.]|(\s?INC)|(\s+$)|([-\s]?)', '', stock_name_reduce) dict_deals['stock_name'].append(stock_name_reduce) dict_deals['account'].append(account_name) dict_deals['date_oper'].append(to_dt(child.get(ticketdate)).strftime('%Y-%m-%d')) current_cost = get_current_cost(stock_name_reduce) # SPB - quantity, # MOEX : buy_qnty sell_qnty if exchange_name == 'MOEX': if child.get('buy_qnty'): quantity = float(child.get('buy_qnty')) else: quantity = - float(child.get('sell_qnty')) else: quantity = float(child.get('quantity')) dict_deals['quantity'].append(quantity) dict_deals['price'].append(float(child.get('price'))) dict_deals['type_oper'].append('deal') dict_deals['currency'].append(child.get(payment_currency)) brok_comm = child.get(brokerage) if brok_comm is None: brok_comm = 0 else: brok_comm = float(brok_comm) dict_deals['brokerage'].append(float(brok_comm)) # if stock_name_proc != stock_name_reduce: if stock_name_proc != '': put_avr_price_in_df(account_name, stock_name_proc, \ pnl.m_net_position, pnl.m_avg_open_price) current_cost = get_current_cost(stock_name_proc) pnl.update_by_marketdata(current_cost) if len(dict_deals['result']) > 0: if exchange_name != 'SPB': dict_deals['result'][-1] = pnl.m_unrealized_pnl * 0.87 -dict_deals['brokerage'][-2] else: dict_deals['result'][-1] = pnl.m_unrealized_pnl - dict_deals['brokerage'][-2] stock_name_proc = stock_name_reduce pnl = PnlSnapshot(stock_name_proc, float(child.get('price')), quantity) dict_deals['result'].append(-1 * brok_comm) else: pnl.update_by_tradefeed(float(child.get('price')), quantity) # , if quantity < 0: if pnl.m_realized_pnl > 0 and exchange_name != 'SPB': pnl_sum = pnl.m_realized_pnl * 0.87 - brok_comm else: pnl_sum = pnl.m_realized_pnl - brok_comm dict_deals['result'].append(float(pnl_sum)) else: pnl.update_by_marketdata(current_cost) dict_deals['result'].append(-1 * brok_comm) put_avr_price_in_df(account_name, stock_name_proc, \ pnl.m_net_position, pnl.m_avg_open_price) current_cost = get_current_cost(stock_name_proc) pnl.update_by_marketdata(current_cost) if len(dict_deals['result']) > 0: if exchange_name != 'SPB': dict_deals['result'][-1] = pnl.m_unrealized_pnl * 0.87 -dict_deals['brokerage'][-2] else: dict_deals['result'][-1] = pnl.m_unrealized_pnl - dict_deals['brokerage'][-2] except Exception as e: print('get_deals --> Oops! It seems we have a BUG!', e)
ãã©ã³ã¶ã¯ã·ã§ã³ã®ãã©ã¡ãŒã¿ãŒã«é¢ããæ å ±ã䜿çšããŠé åãåŠçããããšã«å ããŠããªãŒãã³ããžã·ã§ã³ã®å¹³åäŸ¡æ Œãèšç®ããFIFOã¡ãœããã䜿çšããŠPNLã«ãã£ãŠå®çŸãããŸãã PnlSnapshotã¯ã©ã¹ã¯ãã®èšç®ãæ åœããŸãããããããªä¿®æ£ãå ããŠäœæããããã«ãããã«ç€ºãããã³ãŒããåºç€ãšããŠæ¡çšãããŸããïŒ PïŒLèšç®
ãããŠæåŸã«ãå®è£ ãæãé£ããã®ã¯ãéãã¬ãŒãã£ã³ã°æäœã«é¢ããæ å ±ãååŸããæ©èœ-get_nontrade_operationã§ãã ãã®è€éãã¯ãéãã¬ãŒãã£ã³ã°æäœã«äœ¿çšãããã¬ããŒããããã¯ã«ã¯ããã®æäœãé¢é£ä»ããããŠãããã©ã³ã¶ã¯ã·ã§ã³ã®ã¿ã€ããšã»ãã¥ãªãã£ã«é¢ããæ確ãªæ å ±ããªããšããäºå®ã«ãããŸãã
éååŒæäœã®æ¯æãå
ã®äŸ
é
åœã®æ¯æããŸãã¯æªæãã®ã¯ãŒãã³åå
¥ã¯ã次ã®ããã«è¡šç€ºãããŸãã
- åå ¥ã¯ã©ã€ã¢ã³ãã®æ¯æã<777777> é åœ < ã¢ããã« INC-ao>-> SPBã¬ããŒãããã®é åœã®æ¯æãã
- åå ¥ã¯ã©ã€ã¢ã³ã<777777> é åœéã®æ¯æã < MICROSOFTCOM ->
- æåŸã¯ã©ã€ã¢ã³ã777777iïŒNKD 2 OFZ 24019 ïŒã®æºæ³åŸŽåçš0.00ã«ãŒãã«ã®æ¯æã-> MOEXã¬ããŒãããã®ã¯ãŒãã³ã®æ¯æãã
- FGC UESã®ã¯ã©ã€ã¢ã³ã777777 é åœãžã®åå ¥ã®æ¯æã-æºæ³åŸŽåçšXX.XXã«ãŒãã«-> MOEXã¬ããŒãããã®é åœã®æ¯æãã ãªã©
ãããã£ãŠãæ£èŠè¡šçŸãªãã§è¡ãã®ã¯é£ãããããããããæ倧éã«äœ¿çšããŸãã åé¡ã®ãã1ã€ã®åŽé¢ã¯ãäŒç€Ÿã®ååããããŒããã©ãªãªãŸãã¯æ¯æç®çã®ååŒã®ååãšå¿ ãããäžèŽããªãããšã§ãã ãããã£ãŠãæ¯æãã®ç®çããåãåã£ãçºè¡è ã®ååã¯ãèŸæžãšããã«é¢é£ä»ããå¿ èŠããããŸãã èŸæžãšããŠãååŒã®é åã䜿çšããŸãã äŒæ¥ã®æãå®å šãªãªã¹ãããããŸãã
get_company_from_stré¢æ°ã¯ãã³ã¡ã³ãããçºè¡è åãååŸããŸãã
get_company_from_stré¢æ°
def get_company_from_str(comment): company_name = '' # / flows_pattern = [ '^.+\s<(\w+)?.+->$', '^.+\s(.+)-.+$', '^.+\(\s\d?\s(.+)\).+$', '^.+\s(.+)-.+$' ] for pattern in flows_pattern: match = re.search(pattern, comment) if match: return match.group(1).upper() return company_name
get_company_from_briefcaseé¢æ°ã¯ããã©ã³ã¶ã¯ã·ã§ã³ã«åå ããäŒç€Ÿã®äžã§äžèŽãããã®ãèŠã€ããå ŽåãäŒç€ŸåãèŸæžã«å°ããŸãã
GET_COMPANY_FROM_BRIEFCASEãã¡ã³ã¯ã·ã§ã³
def get_company_from_briefcase(company_name): company_name_full = None value_from_dic = df_deals[df_deals['stock_name'].str.contains(company_name)] company_arr = value_from_dic['stock_name'].unique() if len(company_arr) == 1: company_name_full = company_arr[0] return company_name_full
ãããŠæåŸã«ãéãã¬ãŒãã£ã³ã°æäœã«é¢ããããŒã¿ãåéããæçµæ©èœã¯get_nontrade_operationã§ãïŒ
Get_nontrade_operationé¢æ°
def get_nontrade_operation(XMLdata): nontrade_money_operation = XMLdata.find(flows) if not nontrade_money_operation: return try: for child in nontrade_money_operation: comment = child.get('comment') type_oper_match = re.search('||^.+.+.+$', comment) if type_oper_match: company_name = get_company_from_str(comment) type_oper = get_type_oper(comment) dict_flows['stock_name'].append(company_name) dict_flows['account'].append(account_name) dict_flows['date_oper'].append(to_dt(child.get(operationdate)).strftime('%Y-%m-%d')) dict_flows['type_oper'].append(type_oper) dict_flows['result'].append(float(child.get('amount'))) dict_flows['currency'].append(child.get(currency_flows)) except Exception as e: print('get_nontrade_operation --> Oops! It seems we have a BUG!', e)
ã¬ããŒãããããŒã¿ãåéããçµæã3ã€ã®DataFrameãçæãããŸããããããã¯ããã次ã®ãšããã§ãã
- ãªãŒãã³ããžã·ã§ã³ã®å¹³åäŸ¡æ Œã«é¢ããæ
å ±ãå«ãDataFrameïŒ
- Deal DataFrameïŒ
- éååŒæäœã«é¢ããæ
å ±ãå«ãDataFrameïŒ
ãããã£ãŠãç§ãã¡ãããã¹ãããšã¯ããã©ã³ã¶ã¯ã·ã§ã³ããŒãã«ãšããŒããã©ãªãªæ å ±ããŒãã«ã®å€éšçµåãå®è¡ããããšã ãã§ãã
df_result = pd.merge(df_deals, df_stocks_avg, how='outer', on=['stock_name', 'account', 'currency']).fillna(0) df_result.sample(10)
æåŸã«ãããŒã¿é åã®åŠçã®æåŸã®éšåã¯ãåã®ã¹ãããã§ååŸããããŒã¿é åãšéãã¬ãŒãã£ã³ã°ãã©ã³ã¶ã¯ã·ã§ã³ã®DataFrameã®ããŒãžã§ãã
è¡ãããäœæ¥ã®çµæã¯ãåæã«å¿ èŠãªãã¹ãŠã®æ å ±ãå«ã1ã€ã®å€§ããªãã©ããããŒãã«ã§ãã
df_result_full = df_result.append(df_flows, ignore_index=True).fillna(0) df_result_full.sample(10).head()
DataFrameããã®çµæã®ããŒã¿ã»ããïŒæçµã¬ããŒãïŒã¯CSVã«ç°¡åã«ã¢ããããŒããããBIã·ã¹ãã ã§è©³çŽ°ãªåæã«äœ¿çšã§ããŸãã
if not exists('OUTPUT'): makedirs('OUTPUT') report_name = 'OUTPUT\my_trader_diary.csv' df_result_full.to_csv(report_name, index = False, encoding='utf-8-sig')
AWSã§ããŒã¿ãã¢ããããŒãããŠåŠçãã
é²æ©ã¯æ¢ãŸã£ãŠããããçŸåšãã¯ã©ãŠããµãŒãã¹ãšãµãŒããŒã¬ã¹ã³ã³ãã¥ãŒãã£ã³ã°ã¢ãã«ã¯ãããŒã¿åŠçãšã¹ãã¬ãŒãžã§å€§ããªäººæ°ãéããŠããŸãã ããã¯ãè€éãªèšç®ãããã°ããŒã¿åŠççšã®ã·ã¹ãã ã¢ãŒããã¯ãã£ãæ§ç¯ããããã«é«äŸ¡ãªæ©åšãè³Œå ¥ããå¿ èŠã¯ãªãããå¿ èŠãªæéã ãã¯ã©ãŠãã§é»åãã¬ã³ã¿ã«ããå¿ èŠãªãªãœãŒã¹ãæ¯èŒçå°ãªãæéã§ååã«è¿ éã«å±éããå Žåããã®ã¢ãããŒãã®ã·ã³ãã«ããšäœäŸ¡æ Œã«ãããšããã倧ããã
åžå Žã§æ倧ãã€æãæåãªã¯ã©ãŠããããã€ããŒã®1ã€ã¯Amazonã§ãã Amazon Web ServicesïŒAWSïŒç°å¢ã®äŸãèŠãŠãæè³ããŒããã©ãªãªã®ããŒã¿ãåŠçããããã®åæã·ã¹ãã ãæ§ç¯ããŠã¿ãŸãããã
AWSã«ã¯è±å¯ãªããŒã«ããããŸããã次ã®ãã®ã䜿çšããŸãã
- Amazon S3-ãªããžã§ã¯ãã¹ãã¬ãŒãžãããã«ãããäºå®äžç¡å¶éã®éã®æ å ±ãä¿åã§ããŸãã
- AWS Glueã¯ãããèªäœãæ§é ã決å®ããç¹å®ã®ãœãŒã¹ããŒã¿ã«åºã¥ããŠETLã³ãŒããçæã§ãã匷åãªã¯ã©ãŠãETLãµãŒãã¹ã§ãã
- ãµãŒããŒã¬ã¹ã®ãªã³ã©ã€ã³SQLã¯ãšãªãµãŒãã¹ã§ããAmazon Athenaã䜿çšãããšãå€ãã®æºåãªãã§S3ããã®ããŒã¿ããã°ããåæã§ããŸãã ãŸããAWS Glueãæºåããã¡ã¿ããŒã¿ã«ãã¢ã¯ã»ã¹ã§ããŸããããã«ãããETLãæž¡ããçŽåŸã«ããŒã¿ã«ã¢ã¯ã»ã¹ã§ããŸãã
- Amazon QuickSight-ãµãŒããŒã¬ã¹BIãµãŒãã¹ãä»»æã®èŠèŠåãåæã¬ããŒããããªã³ã¶ãã©ã€ãã§äœæã§ããŸãã
Amazonã®ããã¥ã¡ã³ãã¯å€§äžå€«ã§ããç¹ã«ã AWS Glueã§Athenaã䜿çšããéã®ãã¹ããã©ã¯ãã£ã¹ã«é¢ããèšäºãããã AWS Glueã䜿çšããŠããŒãã«ãšããŒã¿ãäœæããã³äœ¿çšããæ¹æ³ã«ã€ããŠèª¬æããŠããŸãã ãã®èšäºã®äž»ãªã¢ã€ãã¢ã掻çšããŠãåæã¬ããŒãã·ã¹ãã ã®ç¬èªã®ã¢ãŒããã¯ãã£ãäœæããããã«ããããé©çšããŠã¿ãŸãããã
ã¬ããŒãããŒãµãŒã«ãã£ãŠæºåãããCSVãã¡ã€ã«ãS3ãã±ããã«è¿œå ãããŸãã S3ã®å¯Ÿå¿ãããã©ã«ããŒã¯ãæ¯é±åææ¥-ååŒé±ã®çµããã«è£å ãããäºå®ã§ãããããã¬ããŒãã®äœæãšåŠçã®æ¥ä»ã«ããŒã¿ãåå²ããã«è¡ãããšã¯ã§ããŸããã
ãã®ã¢ãããŒãã§ã¯ããã®ãããªããŒã¿ã«å¯ŸããSQLã¯ãšãªã®æäœãæé©åããã ãã§ãªããããšãã°åè«æã®è²¡åçµæã®å€åã®ãã€ããã¯ã¹ãååŸãããªã©ãè¿œå ã®åæãè¡ãããšãã§ããŸãã
Amazon S3ã䜿çšãã
- S3ã«ãã±ãããäœæãããã¬ããŒãããŒãµãŒããšåŒã³ãŸãã
- ãã®ãã±ãããreport-parserãã«ãmy_trader_diaryããšãããã©ã«ããŒãäœæããŸãã
- ãmy_trader_diaryããã£ã¬ã¯ããªã§ãçŸåšã®ã¬ããŒãã®æ¥ä»ã䜿çšããŠãã£ã¬ã¯ããªãäœæããŸããããšãã°ããdate_report = 2018-10-01ããšãããã®äžã«CSVãã¡ã€ã«ãé 眮ããŸãã
- å®éšãšã»ã¯ã·ã§ãã³ã°ã®ç解ãæ·±ããããã«ããdate_report = 2018-09-27ããšãdate_report = 2018-10-08ããšãã2ã€ã®ãã£ã¬ã¯ããªãäœæããŸãã åãCSVãã¡ã€ã«ããããã«å ¥ããŸãã
- æçµçãªS3ãã±ãããã¬ããŒãããŒãµãŒãã¯ã次ã®å³ã«ç€ºãããã«ãªããŸãã
AWS Glueã䜿çšãã
æŠããŠãS3ã«ããããŒã¿ããå€éšããŒãã«ãäœæããã«ã¯ãAmazon Athenaããã§ããŸããããAWS Glueã¯ãã®ããã®ããæè»ã§äŸ¿å©ãªããŒã«ã§ãã
- AWS Glueã«ç§»åããæ°ããã¯ããŒã©ãŒãäœæããŸãããã®ã¯ããŒã©ãŒã¯ãæ¥ä»ãå ±åããããšã«ãããåå¥ã®CSVãã¡ã€ã«ãã1ã€ã®ããŒãã«ãåéããŸãã
- æ°ããã¯ããŒã©ãŒã®ååãèšå®ããŸãã
- ããŒã¿ãååŸãããªããžããªã瀺ããŸãïŒs3ïŒ// report-parser / my_trader_diary /ïŒ
- ã¯ããŒã©ãŒãèµ·åããS3ã®æå®ããããªãœãŒã¹ã«ã¢ã¯ã»ã¹ããããã®ã¢ã¯ã»ã¹æš©ãæã€æ°ããIAMããŒã«ãéžæãŸãã¯äœæããŸãã
- 次ã«ãéå§é »åºŠãèšå®ããå¿ èŠããããŸãã ä»ã®ãšãããªã³ããã³ãã§èšå®ããŠããŸãããå°æ¥çã«ã¯ãããå€ãããããŒã³ãã¯æ¯é±ã«ãªããšæããŸãã
- ä¿åããŠãã¯ããŒã©ãŒãäœæãããã®ãåŸ ã¡ãŸãã
- ã¯ããŒã©ãŒãæºåå®äºç¶æ
ã«ãªã£ãããèµ·åããŠãã ããïŒ
- åäœãããšãæ°ããmy_trader_diaryããŒãã«ãAWS Glueã«è¡šç€ºãããŸãïŒDatabase-> Tablesã¿ãïŒ
çæãããããŒãã«ããã詳现ã«æ€èšããŠãã ããã
äœæãããããŒãã«ã®ååãã¯ãªãã¯ãããšãã¡ã¿ããŒã¿ã®èª¬æãèšèŒãããããŒãžã«ç§»åããŸãã äžçªäžã«ã¯ããŒãã«ã¬ã€ã¢ãŠãããããææ°ã®ãã®ã¯ãœãŒã¹CSVãã¡ã€ã«ã«ãªãådate_reportã§ãã ãã®AWS Glueåã¯ããœãŒã¹ããŒã¿ã®ã»ã¯ã·ã§ã³ã®å®çŸ©ã«åºã¥ããŠèªåçã«äœæãããŸãïŒãã±ããS3ã§ã¯ããã©ã«ãã«ç¹å¥ãªååãä»ããŸãã-date_report = YYYY-MM-DDãããã«ãããæ¥ä»ã§åºåã£ãŠã»ã¯ã·ã§ã³ãšããŠäœ¿çšã§ããŸãïŒã
ããŒãã«ã®ããŒãã£ã·ã§ã³åå²
åãããŒãžã®å³äžé ã«ãã[ããŒãã£ã·ã§ã³ã®è¡šç€º]ãã¿ã³ãã¯ãªãã¯ãããšãçæãããããŒãã«ãã©ã®ã»ã¯ã·ã§ã³ã§æ§æãããŠãããã確èªã§ããŸãã
åãããŒãžã®å³äžé ã«ãã[ããŒãã£ã·ã§ã³ã®è¡šç€º]ãã¿ã³ãã¯ãªãã¯ãããšãçæãããããŒãã«ãã©ã®ã»ã¯ã·ã§ã³ã§æ§æãããŠãããã確èªã§ããŸãã
ããŒã¿åæ
åŠçæžã¿ã®ããŒã¿ãèªç±ã«ããŒãã§ããã®ã§ãç°¡åã«åæãéå§ã§ããŸãã éå§ããã«ã¯ãAmazon Athenaã®æ©èœãåæã¯ãšãªãå®è¡ããæãç°¡åã§æéã®æ¹æ³ãšèããŠãã ããã ãããè¡ãã«ã¯ãAmazon AthenaãµãŒãã¹ã«ç§»åããå¿ èŠãªããŒã¿ããŒã¹ïŒéèïŒãéžæããŠã次ã®SQLã³ãŒããèšè¿°ããŸãã
select d.date_report, d.account, d.stock_name, d.currency, sum(d.quantity) as quantity, round(sum(d.result), 2) as result from my_trader_diary d group by d.date_report, d.account, d.stock_name, d.currency order by d.account, d.stock_name, d.date_report;
ãã®ãªã¯ãšã¹ãã«ããããã¹ãŠã®ã¬ããŒãæ¥ä»ã«ã€ããŠå蚌åžã®çŽè²¡åçµæãæäŸãããŸãã ãªããªã åãã¬ããŒããç°ãªãæ¥ä»ã«3åã¢ããããŒãããŸããããçµæã¯å€ãããããã¡ããå®éã®åžå Žã§ã¯ç°ãªããŸãã
ããããåä¿¡ããããŒã¿ãæè»ãªè¡šãŸãã¯å³ã®åœ¢åŒã§èŠèŠåããå Žåã¯ã©ãã§ããããïŒ ããã§ã¯ãAmazon QuickSightã圹ç«ã¡ãŸããããã«ãããSQLã¯ãšãªãèšè¿°ããã®ãšã»ãŒåãéãã§æè»ãªåæãæ§æã§ããŸãã Amazon QuickSightãµãŒãã¹ã«ã¢ã¯ã»ã¹ããŸãïŒç»é²ããŠããªãå Žåã¯ç»é²ãå¿ èŠã§ãïŒã
[æ°èŠåæ]-> [æ°èŠããŒã¿ã»ãã]ãã¿ã³ãã¯ãªãã¯ãã衚瀺ããããŠã£ã³ããŠã§ããŒã¿ã»ããã®ãœãŒã¹ãéžæããŠã[Athena]ãã¯ãªãã¯ããŸãã
ããŒã¿ãœãŒã¹ã®ååãããšãã°ãPNL_analysisããèãåºãããããŒã¿ãœãŒã¹ã®äœæããã¿ã³ãã¯ãªãã¯ããŸãã
次ã«ãããŒã¿ããŒã¹ãšããŒã¿ãœãŒã¹ããŒãã«ãéžæããå¿ èŠããã[ããŒãã«ã®éžæ]ãŠã£ã³ããŠãéããŸãã ããŒã¿ããŒã¹-財åãããã³ãã®äžã®ããŒãã«my_traider_diaryãéžæããŸãã ããã©ã«ãã§ã¯ãããŒãã«å šäœã䜿çšãããŸããããã«ã¹ã¿ã SQLã䜿çšããéžæãããšãå¿ èŠãªããŒã¿ãµã³ãã«ãã«ã¹ã¿ãã€ãºããã³åŸ®èª¿æŽã§ããŸãã ããšãã°ãããŒãã«å šäœã䜿çšããŠã[ããŒã¿ã®ç·šé/ãã¬ãã¥ãŒ]ãã¿ã³ãã¯ãªãã¯ããŸãã
æ°ããããŒãžãéããããã§è¿œå ã®èšå®ãè¡ããæ¢åã®ããŒã¿ãåŠçã§ããŸãã
ããã§ãè¿œå ã®èšç®ãã£ãŒã«ããããŒã¿ã»ããã«è¿œå ããå¿ èŠããããŸãïŒååæãšéçšå¹Žã 泚ææ·±ãèªè ã¯ãæçµã¬ããŒããCSVã«ä¿åããåã«ããã®ãããªæäœãããŒãµãŒåŽã§ç°¡åã«è¡ããããšã«æ°ä»ããããããŸããã ééããªããç§ã®ç®æšã¯ãBIã·ã¹ãã èšå®ã®æ©èœãšæè»æ§ããã®å Žã§å®èšŒããããšã§ãã [æ°ãããã£ãŒã«ã]ãã¿ã³ãã¯ãªãã¯ããŠãèšç®ãã£ãŒã«ãã®äœæãç¶ããŸãã
æ°ãããã£ãŒã«ããäœæãã
æäœã®å¹Žãšååæã匷調ããããã«ãåçŽãªåŒã䜿çšãããŸãã
æ°ãããã£ãŒã«ãã®æ°åŒãå
¥åãã
èšç®ãã£ãŒã«ããæ£åžžã«äœæãããéžæã«è¿œå ãããããããŒã¿ã»ããã«ãmy_pnl_analyzeããªã©ã®ååãä»ãããä¿åããŠèŠèŠåããã¿ã³ãã¯ãªãã¯ããŸãã
ãã®åŸãAmazon QuickSightã¡ã€ã³ããŒãã«ç§»è¡ããæåã«è¡ãå¿ èŠãããã®ã¯ãã¬ããŒãæ¥ä»ã®ãã£ã«ã¿ãŒãèšå®ããããšã§ãïŒåãããŒã¿ã3ã€ã®ã»ã¯ã·ã§ã³ããåéããããšããäºå®ãèæ ®ããŠïŒã ã¬ããŒãæ¥ä»2018-10-01ãéžæãã[é©çš]ãã¿ã³ãã¯ãªãã¯ããŠã[èŠèŠå]ã¿ãã«ç§»åããŸãã
ãã£ã«ã¿ãŒèšå®
ããã§ãããšãã°ãååŒå£åº§å ã®å蚌åžã®ããŒããã©ãªãªã®çµæãä»»æã®ãã¬ãŒã³ã§èŠèŠåããé貚ïŒçµæãç°ãªãé貚ã§æ¯èŒã§ããªãããïŒãšæäœã®çš®é¡ã§é çªã«åå²ã§ããŸããããããBIã®æã匷åãªããŒã«ã§ããããããããŒãã«ããå§ããŸããããã¹ããŒã¹ãç¯çŽãã衚瀺ã®æè»æ§ãé«ããããã«ãé貚ãå¥ã®ã³ã³ãããŒã«ã«é 眮ããŸãïŒMS Excelã®ã¹ã©ã€ã¹ãšåæ§ïŒ
äžèšã®è¡šã¯ãæè³å®¶ãçŸåšFGC UESã®å šæ ªåŒã売åŽããããšã決å®ããå Žåãæ倱ãèšé²ããããšã瀺ããŠããŸãã1,509.91 pã®éé¡ã§æ¯æãããé åœã圌ãã¯ãã®è²»çšãã«ããŒããŠããŸããïŒ1,763.36ã«ãŒãã«-è² ã®çºæ¿ã¬ãŒãå·®ãš174ã«ãŒãã«-é åœã«å¯Ÿããå人æåŸçšïŒãExchangeã§ããè¯ãæéãåŸ ã£ãŠåŸ ã€ã®ã¯çã«ããªã£ãŠããŸãã
次ã®ã°ã©ãã¯æ£ã°ã©ãã§ãã
次ã«ãåããŒããŒã«ãããæè³ããããããŒããã©ãªãªã«äœæ¥ããããæææéå šäœã®åçæ§ã瀺ãè¡šãäœæããŸãããããè¡ãã«ã¯ã2ã€ã®æ°ããèšç®ãã£ãŒã«ãsum_investmentãšcount_daysãè¿œå ããŸãã
ãã£ãŒã«ãsum_investment
èšç®sum_investmentãã£ãŒã«ãïŒæè³ã®éïŒæ¹æ³ã決å®ããã§ãããïŒ
ifelseïŒ{stock_nameã} =ãOFZ 24019ãã{avg_open_priceã} *æ°é* 10ã*æ°é{avg_open_price}ïŒ
åµåžã®æè³ã®æŒç®åŠçéãžã®ãã®ã¢ãããŒãã«ãããäºå®ãšåœŒã¯åžžã«äŸ¡æ Œã瀺ããŸã-é¡é¢ã®ããŒã»ã³ããŒãžãšããŠïŒãã®å Žåã®é¡é¢ã¯1000ã«ãŒãã«ã§ãïŒã
ifelseïŒ{stock_nameã} =ãOFZ 24019ãã{avg_open_priceã} *æ°é* 10ã*æ°é{avg_open_price}ïŒ
åµåžã®æè³ã®æŒç®åŠçéãžã®ãã®ã¢ãããŒãã«ãããäºå®ãšåœŒã¯åžžã«äŸ¡æ Œã瀺ããŸã-é¡é¢ã®ããŒã»ã³ããŒãžãšããŠïŒãã®å Žåã®é¡é¢ã¯1000ã«ãŒãã«ã§ãïŒã
ãã£ãŒã«ãcount_days
count_day ( ) :
dateDiff(parseDate({date_oper}),parseDate({date_report}))
dateDiff(parseDate({date_oper}),parseDate({date_report}))
æçµçãªè¡šã¯ã次ã®ã¹ã¯ãªãŒã³ã·ã§ããã«ç€ºãããŠããŸãã
çµè«ãšãŸãšã
ã¬ããŒãããŒãµãŒã®å®è£ ãšãAmazonãµãŒãã¹ã䜿çšããŠããªã³ã¶ãã©ã€ãã§æºåãããããŒã¿ãåæããæ¹æ³ãæ€èšããŸããããŸãã以äžã®ããã«ãæè³ããŒããã©ãªãªåæã®ããžãã¹ããã³åºæ¬çãªåŽé¢ã«ã€ããŠã觊ããŸããããã®ãããã¯ã¯ã»ãšãã©åºå€§ã§ããã1ã€ã®èšäºã«åããã®ã¯ããªãå°é£ã§ããå¥ã®åºçç©ãäžé£ã®åºçç©ã«å ¥ããããšã¯çã«ããªã£ãŠãããšæããŸãã
ãããŒã«ãŒã¬ããŒãåŠçããŒã«ãšããã«é¢é£ããã¢ãããŒããšã¢ã«ãŽãªãºã ã®äœ¿çšã«é¢ããŠã¯ãä»ã®ãããŒã«ãŒã®ã¬ããŒããåŠçããããã«ïŒé©åãªå€æŽãå ããŠïŒäœ¿çšã§ããŸãããããã«ãããã³ãŒããããªãã®ããŒãºã«é©å¿ãããããšãèšç»ããŠãããªããç§ã¯ããã€ãã®ãã³ããäžããæºåãã§ããŠããã®ã§ã質åããããšãheããªãã§ãã ãã-ç§ã¯ééããªããããã«çããããšããŸãã
ãã®ã·ã¹ãã ããã®çšéãèŠã€ããããã«çºå±ããããšã確信ããŠããŸããããšãã°ãããŒããã©ãªãªã®å®å šãªPNLã®èšç®ã«ãé èšéããã³ãã®ä»ã®ææ°æïŒè³éã®åŒãåºããªã©ïŒã®äŒèšåŠçãããã³åµåžã®æ¯æããªã©ãè¿œå ããããšãèšç»ãããŠããŸãããããã®è¿œå åã¯ãã¹ãŠPythonã«ç§»æ€ãããããŒãµãŒåŽã§èšç®ãããŸãã
ãã®ãœãªã¥ãŒã·ã§ã³ã®ã¢ãŒããã¯ãã§ãããäž»èŠãªããžãã¹é¡§å®¢ã§ããç§ã¯ã次ã®ããã«ããã«ã¢ããã°ã¬ãŒãããããšãæåŸ ããŠããŸãããã¡ããããããŸã§ä»ã®å¯èœæ§ã¯ãããŸããããããŒã¯ã³ã®è»¢éãšãµã³ããªã³ã°ç¯å²ãåãããããŒã«ãŒAPIã¯ãæ¯é±ã®çã®ã¬ããŒããåä¿¡ããã®ã«çæ³çã§ããAmazonåŽã§ã®ãã®åŸã®å®å šèªååŠçïŒAWS Glueã§ETLãžã§ããããªã¬ãŒããŠãããAmazon QuickSightã§ã°ã©ããšè¡šã®åœ¢åŒã§å®æããçµæãååŸããããšã§ãããã»ã¹ãå®å šã«èªååã§ããŸãã
å®å šãªãœãŒã¹ã³ãŒãã¯ãäžã®ç§ã®ãªããžããªã§èŠã€ããããšãã§ããŸãGitHubã®