çæåµ
ãããã¯ãã§ãŒã³ã§ã®æåã®OTCéèååŒã¯ãMTSã¢ãã€ã«ãªãã¬ãŒã¿ãŒãšNational Settlement DepositoryïŒNSDïŒã®åå ã«ããçæåµåžã®çºè¡ã§ããã ããã¯ããã¹ãŠã®é èšæ©é¢ã®äžçš®ã®ãäžå€®éè¡ãã§ãã é èšæ©é¢ã¯ã蚌åžææè ã®èšé²ãä¿æãçºè¡ããã€ã³ãã©ã¹ãã©ã¯ãã£ãŒã®ä»²ä»è ã§ãã
ãã®ãã©ã³ã¶ã¯ã·ã§ã³ã§ã¯ãMTSã¯ã¹ããŒãã³ã³ãã©ã¯ãã®é¢æ°ãåŒã³åºãããšã«ããããããã¯ãã§ãŒã³ã«èšŒåžãSberbankã«å£²åŽããææã®è¡šçŸãèšé²ãããããã¯ãã§ãŒã³ã§ãã©ã³ã¶ã¯ã·ã§ã³ã®æ¡ä»¶ãšã®åæã確èªããŸããã äž¡åœäºè ã«ãã£ãŠçœ²åãããå察åœä»€ã¯ãNSDã«ãã£ãŠåä¿¡ãããNSDã¯ããããäŒèšã·ã¹ãã ã§å®è¡ããŸããã ããã«ããããã¯ãã§ãŒã³ã¯ãååŒåå è ã®å£åº§ã蚌åžãšãéã§è¡šç€ºããŸããã
ãã®ãããžã§ã¯ãã§ã¯ãã¯ããŒãºããšã³ã¿ãŒãã©ã€ãºãããã¯ãã§ãŒã³ãœãªã¥ãŒã·ã§ã³ãäœæããããã«èšèšããããªãŒãã³ãœãŒã¹ã®Hyperledger Fabric 1.1ãã©ãããã©ãŒã ãéžæããŸããã ããŒã¿ã®ãã©ã€ãã·ãŒã確ââä¿ããå¿ èŠãããããããããªãã¯ãããã¯ãã§ãŒã³ã¯ããã§ã¯é©ããŠããŸããã Ethereumãããã¯ãã§ãŒã³ã«å®è£ ãããM. Videoã䜿çšããSberbankã®ãã¡ã¯ã¿ãªã³ã°ãã€ãããã§ãã®ãããªå¶éã«ééããŸããã å¯Ÿç §çã«ãHyperledger Fabricã䜿çšãããšããã¹ãŠã®åå è ãå°çšãã£ãã«ã®ãã©ã³ã¶ã¯ã·ã§ã³ã«é 眮ããŠãå¿ èŠãªæ å ±ã亀æãããã«æ©èœã®ã¹ããŒãã³ã³ãã©ã¯ãã§åŠçã§ããŸãã
MTS瀟åµçºè¡ãããžã§ã¯ãã®ãœãŒã¹ã³ãŒãã¯ãGitHubã«å ¬éãããŸããã äœæ¥ã®ã¢ã«ãŽãªãºã ã«å ¥ããªããŠãããã©ã³ã¶ã¯ã·ã§ã³ã®ã©ã€ããµã€ã¯ã«ã§ã¯ããããã¯ãã§ãŒã³ã決æžæ³šæã®ãã©ã³ã¹ããŒããšããŠããªãæ§ãããªåœ¹å²ãäžããããããšãç解ã§ããŸãã äžæ¹ããããã®æ瀺ã«åºã¥ããŠãå£åº§æ®é«ã¯å€åããŸããããããã£ãŠãããžãã¹ããžãã¯ã®èŠ³ç¹ãããããã¯åçŽãªé»åææžç®¡çãµãŒãã¹ãããèå³æ·±ããã®ã§ããã
ãœãªã¥ãŒã·ã§ã³ã®äž»ãªå©ç¹ã¯æ±çšæ§ã§ããã ã2ã€ã®ååŒå ãš1ã€ã®ã¬ãžã¹ãã©ãã¹ããŒã ã¯ãOTCåžå Žã§ã®ã»ãšãã©ãã¹ãŠã®ååŒãã«ããŒããããããªå€æŽã䌎ããŸã-åæ¥ååŒã®ã»ãšãã©ãäžè¬çã§ãã
REPO 1.0
ãããã¯ãã§ãŒã³ã®æ°ãããããžã§ã¯ãã§ãç§ãã¡ã¯ãåæ£ã·ã¹ãã ã§ã®è²·æ»ãå¥çŽãå®è£ ããæ¹æ³ã瀺ãããšã«ããŸãã-蚌åžã§æ ä¿ããããéã®ããŒã³ã éåžžããããããã³ãã®ä»ã®OTCãã©ã³ã¶ã¯ã·ã§ã³ã¯ã仲ä»æ¥è ãé èšæ©é¢ã決æžæ©é¢ããããŒã«ãŒãçµç±ããŸãã
ãã®ãããžã§ã¯ãã§ã¯ãSberbankãšå€åœã®ããŒãããŒãšã®éã§è²·æ»ãå¥çŽãç· çµããŸããã Hyperledger FabricããŒãžã§ã³1.2ãæ¢ã«äœ¿çšããŠããŸãã MTSãã³ããšæ¯èŒããŠã2ã€ã®éãããããŸããã
- ååŒã®2è
ã®ã¿ããããã¯ãã§ãŒã³ã«æ¥ç¶ããããã®é éè
ã§ããEuroclearãšClearstreamã¯ãSberbankãšãã®ã«ãŠã³ã¿ãŒããŒãã£ã®ããã¯ãªãã£ã¹ããåŸæ¥ã®ããŒã¿äŒéãã£ãã«ãä»ããŠãã¹ãŠã®æ³šæãåãåããŸããã
- ã¹ããŒãã³ã³ãã©ã¯ãã§ã¯ãè€éãªããžãã¹ããžãã¯ãå®è£
ããŸããïŒããŒã³ã®æ
ä¿ãšããŠæ©èœããã»ãã¥ãªãã£ã®æ¯æ¥ã®èŠç©ããããããã¯ãã§ãŒã³ã«ããŠã³ããŒããããã¹ããŒãã³ã³ãã©ã¯ãã¯ãæ
ä¿ãå²åŒãåºå£äº€æã®ã«ã¬ã³ããŒã®å€æŽãªã©ã®ãã©ã¡ãŒã¿ãŒãèæ
®ããŠãæ©æè¿æžã®å¿
èŠæ§ãšéé¡ãèšç®ããŸããã åå è
éã®èšç®ã¢ã«ãŽãªãºã ã®ãã®ãããªP2Påæã¯ãåæ£ã¬ãžã¹ããªãªãã§ã¯ååŸã§ããŸããã ããã¯ãååœäºè
ã«ãã矩åãšéé¡ã®ç¬ç«ããèšç®ãããã¯ããã«äŸ¿å©ã§ããæéã®ããã調æŽã確èªã¯äžèŠã§ãã
ã«ãŠã³ã¿ãŒããŒãã£éã§ããã£ãã«å ã§ãã£ãããšã¯ãŒã¯ãããŒãç·šæããŸããã ãããã®ããŒã¿ã¯ãããã¯ãã§ãŒã³ã«ä¿åãããŠããŸããã åæ£ã¬ãžã¹ããªãå€æŽãããã³ã«ããã£ãã«ã¡ã³ããŒã¯é»åã¡ãŒã«ã¢ã©ãŒããåãåããŸããã
ãREPO 1.0ãã¯æ³çåŽé¢ãã解決ããŸããã ãã倧ææ³åŸäºåæã®å©ããåããŠããã³ãã³é«çè£å€æã®äºä»¶ã®åæãè¡ãããŸããã ããã«ãéè¡ãšãã®ååŒå ã®EDSã¯ç°ãªãæå·åã¢ã«ãŽãªãºã ã䜿çšããŸããã
REPO 1.0ã¯ã©ã®ããã«æ©èœããŸããïŒ
ãã©ã³ã¶ã¯ã·ã§ã³ã®åããŒãã£ã«ã¯ãç¬èªã®ãããã¯ãã§ãŒã³ããŒãããããŸãã ãã¹ãŠã®ããŒãã¯ãP2Pãããã¯ãŒã¯ã§äºãã«æ¥ç¶ãããŠããŸãã åãåŒããå¿ èŠã ãšããŸãã ååŒã®åœäºè éã§ã¹ããŒãå¥çŽãå±éããŸããããã§ã¯ãéèååãå®å šã«èšè¿°ãããŠããŸãã
ç§ãã¡ã®åŽããå¥çŽãäœæããåŸããã¬ãŒããŒã«ãã£ãŠçœ²åãããŸãã ãŸããã¯ã©ã€ã¢ã³ãã¯å¥çŽã確èªããŠçœ²åããŸãã 次ã«ã眲åã確èªããã³æ€èšŒãããŸãã ãã®å ŽåãååŒã¯è±åœã®æ³åŸã®äžã§è¡ãããé»åããžã¿ã«çœ²åã®ããŒã¿ã¯GMRAææžã«å ¥åãããŸããã ã¯ã©ã€ã¢ã³ãã®äžéšã«ãµã€ã³ãªã³ããã«ã¯ãæš©éã®ãã人ã眲å蚌ææžã«ååšããããšã®æ€èšŒãå¿ èŠã§ãã æåŸã«ãã¯ã©ã€ã¢ã³ãã¯å¥çŽãåãå ¥ãããã¹ãŠã®æ¡ä»¶ã«åæããŸãã 眲åæžã¿ã®å¥çŽã«ã¯ãä»»æã®æ°ã®ããã¥ã¡ã³ããæ·»ä»ã§ããŸãã
ãã®åŸãå¥çŽã¯ãäœæ¥äžãã®ã¹ããŒã¿ã¹ãåãåããŸãã æ°ããåžå ŽäŸ¡æ ŒãããŒããããšããäœæ¥äžãã®å¥çŽãèªåçã«åèšç®ãããŸãã å¥çŽã«èšŒåžãããå Žåãåžå ŽäŸ¡æ ŒãååŸãããLoan-To-ValueïŒLTVïŒãåèšç®ãããŸã-蚌åžã®èšŒåžã®äŸ¡å€ã«å¯Ÿããèè³é¡ã®æ¯çã LTVã¯è²·æ»ãå¥çŽã®éèŠãªæ¡ä»¶ã®1ã€ã§ããããã®æå³ã¯å¥çŽã§èŠå®ãããŠããŸãã æ ªäŸ¡ã¯æ¥æ¿ã«äžæããLTVã¯GMRAã§ç€ºãããŠããäŸ¡æ Œãããäœããªã£ãŠããŸãïŒè±åœã®æ³åŸã«é¢ããŠã¯ïŒã ãããã£ãŠãéè¡ã¯ãæ°ããäŸ¡æ Œãèæ ®ã«å ¥ããŠãéè¡ãããé«ãã»ãã¥ãªãã£ãä¿æããŠããããšãå€æããããã蚌åžã顧客ã«ïŒãªãã·ã§ã³ã®1ã€ãšããŠïŒè¿ããŸãã
ããããLTVã倧ãããªããšãããã°ã©ã ã¯æ ä¿éç¥ïŒè¿œå ã®ã»ãã¥ãªãã£ïŒæ ªåŒãŸãã¯ééïŒãäœæããå¿ èŠæ§ã«é¢ããã¯ã©ã€ã¢ã³ããžã®éç¥ãå°å·ããŠãLTVå€ãæåã®éç¥ã«æ»ãããã«ããŸãã 以åã¯ãæ ä¿éç¥ã¯ã¡ãŒã«ã§ã®ã¿éä¿¡ã§ãããã®ããã«åå¥ã®ããã¥ã¡ã³ããäœæããããããã®ããã¥ã¡ã³ãã®äœæäžã«LTVãåã³å€æŽãããå¯èœæ§ããããŸããã ããã§ããªã³ã©ã€ã³ã®ã¯ã©ã€ã¢ã³ãã§åãèšç®ã衚瀺ãããç°¡åã«å¯Ÿè©±ã§ããŸãã
ããã«ãããã°ã©ã ã¯ãå©æ¯ãèæ ®ããŠèšŒåžã®è²·æ»ãã®äŸ¡æ Œãæ¯æ¥ä¿®æ£ããŸãã ã¯ã©ã€ã¢ã³ããåžå ŽäŸ¡æ ŒãããŒããããšãã«åæããªãå Žåã圌ã¯å®å šãªåèšç®ãã°ã調ã¹ãŸã-äœããäœã«ãªããã©ã®äŸ¡æ ŒãããŒããããã©ãããæ¥ãã®ãã ãããŠããã£ããã®è°è«ãå§ãŸããŸãã
ã¬ã2.0
ãããã¯ãã§ãŒã³äžã®REPOããå éšããžãã¯ã«åºã¥ããŠå®éã®è³ç£ã®ç§»åãéå§ã§ããããã«ãããã£ãã®ã§ãã ããããREPO 1.0ã§ã¯ã西æŽã®é èšæ©é¢ã®æ¥ç¶ã«é¢ããçµç¹äžã®å°é£ã®ãããããããŸã éæã§ããŠããŸããã ããã§ãæ°ããRepo 2.0ãã€ããããéå§ããŸããã 圌ã«ã¯2ã€ã®ç®æšããããŸããã
- ååŒã¯ãMTSåµåžãããžã§ã¯ãã®ã€ã³ãã©ã¹ãã©ã¯ãã£ãæ倧éã«æŽ»çšããããã«ã2è
ãšé èšæ©é¢ã®åå ãåŸãŠéå¬ããå¿
èŠããããŸãã
- æ
ä¿ãåè©äŸ¡ããåæ£ãããã¯ãŒã¯ã«æ¥ç¶ãããé èšæ©é¢ãèªåçã«å®è¡ã§ããããŒãžã³ã³ãŒã«ãèšå®ããã«ã¯ããããã¯ãã§ãŒã³ã匷åããå¿
èŠããããŸãã
NSDã¯ããã«ãããžã§ã¯ãã«æ¥ç¶ããããšèããŸããã åœå éèåžå Žã管çããé£éŠæ³ã®ä¿å®çãªåéã§ãããã¯ãã§ãŒã³ã§éå§ããããã©ã³ã¶ã¯ã·ã§ã³ãç²åŸããããã«ãé»åææžç®¡çå¥çŽã®5ããŒãžã®è£è¶³å¥çŽãåŒè·å£«ãšååããŸããã ããã¯ããã©ã³ã¶ã¯ã·ã§ã³ãšNSDã®ãã¹ãŠã®é¢ä¿è ã«ãã£ãŠçœ²åãããŸããã
NSDã¯ããã®ãã©ã³ã¶ã¯ã·ã§ã³ã§ã¯ãªã¢ãªã³ã°ããŠã¹ãšããŠæ©èœããŸããã 圌ã¯ãè³éãšèšŒåžã®ç§»åã«é¢ãããã¹ãŠã®æ瀺ãå®è¡ããŸããã ãã®ååŒã¯ãã·ã¢ã®æ³åŸã®äžã§ç· çµãããŸããã
ã¯ã©ã€ã¢ã³ãã¯é»å眲åã䜿çšããŠå¥çŽãåãå ¥ããŸããã ãã®åŸãSberbankã¯ãã®çœ²åã䜿çšããŠå¥çŽãæ¿èªããŸããããã¹ãŠã®ãã©ã¡ãŒã¿ãŒãå¿ èŠãªå€ã«æºæ ããŠããããã¯ã©ã€ã¢ã³ãããæ¿èªãã人ã®æš©éã確èªããŸããã ãã®åŸãå¥çŽãæ©èœããŸããã NSDãåžå ŽããŒã¿ãã¢ããããŒãããã¹ããŒãå¥çŽãåèšç®ãããŸããã
REPO 2.0ã¯ã©ã®ããã«æ©èœããŸããïŒ
ãããã¯ãŒã¯ã®å±éãšãã¯ã©ã€ã¢ã³ãã€ã³ã¿ãŒãã§ã€ã¹ãšãã§ãŒã³ã³ãŒãã®çžäºäœçšã«ã¯ã Fabric Starterãœãªã¥ãŒã·ã§ã³ã䜿çšããŸããã HLFã®æšæºgrpcã€ã³ã¿ãŒãã§ãŒã¹ã®ä»£ããã«ãREST APIãæäŸããŸãããã®å Žåãçµ±åã®è€éããå€§å¹ ã«åæžãããŸããã
ãããã¯ãŒã¯ã¯æ¬¡ã®ããã«ã¢ããããŸããã DockerãµãŒããŒãžã®äºåã€ã³ã¹ããŒã«åŸã®3ã€ã®åŽé¢ã®ãããããFabric Starterãèµ·åããããŒãã®ã³ã³ããŒãã³ãã§ã³ã³ãããŒãäœæããŸããã ãããã®ã³ã³ããŒãã³ãã«ã¯ãä»ã®çµç¹ãšå¯Ÿè©±ããããã®å€éšãã¢ãããã³ããŒââããã¯ã©ã€ã¢ã³ãã¢ããªã±ãŒã·ã§ã³ãšå¯Ÿè©±ããããã®REST APIãµãŒãã¹ãå«ãŸããŠããŸããã Starterãèµ·åãããšããããã¯ãã§ãŒã³ãããã¯ãŒã¯ãæ§æãããendorsement-policyã䜿çšãããã§ãŒã³ã³ãŒããã€ã³ã¹ããŒã«ããããã©ã€ããŒããã£ãã«ãäœæãããŸããã ãã®å Žåãåãã©ã³ã¶ã¯ã·ã§ã³ã«ã¯3人ã®åå è å šå¡ã®çœ²åãå¿ èŠã§ãã
ãã¹ã段éã§ã¯ãåå è ã®ãµãŒããŒéã®éä¿¡ãæŽçããããã«Docker Swarmã䜿çšãããŸããããå®éã®ååŒãè¡ãããã«ãåå è ã¯DNSã«åãæ¿ããŸããã ãã©ãããã©ãŒã èªäœãã¡ãã»ãŒãžã®è»¢éãæ åœããããŒã¿ã¯TLSæå·åã䜿çšããŠã€ã³ã¿ãŒãããçµç±ã§éä¿¡ãããŸãã
åé¡ã®æè¡é¢
HLFã§ã®åæ£ã¢ããªã±ãŒã·ã§ã³ã®éçºããã»ã¹ã¯ãããŒã¿æ§é ãšãã§ãŒã³ã³ãŒãïŒå®éã«ã¯ãã¹ãã¢ãããã·ãŒãžã£ã®ã»ããïŒã§éåžžã«äŒçµ±çã«å§ãŸããŸãããã®åŒã³åºãã¯ãå åž³ããã®ãããã®æ§é ã®ä¿åãå€æŽãèªã¿åãã«ã€ãªãããŸãã ãã®ãã©ãããã©ãŒã ã§ã¯ãããŒã«ã«ã¹ãã¬ãŒãžçšã®ãã§ãŒã³ã³ãŒããšDBMSã®éçºã«ããŸããŸãªããã°ã©ãã³ã°èšèªã䜿çšã§ããŸãã ããããGoãšCouchDBã奜ã¿ãŸãã
ããŒã¿ã¢ãã«ã®ã¬ãã®äžå¿çãªãšã³ãã£ãã£ã¯ãå¥çŽèªäœãšãã®åäŒç€Ÿã§ãã ãããã¯ãããŒãžã³ã³ãŒã«ãšåæ§ã«ã2人ã®ãã€ãããã®ããããã«å¯ŸããŠäœæãããŸããã ãã®ã¢ãŒããã¯ãã£ã¯ãã泚æãã®æ¬è³ªã«åºã¥ããMTSåµåžã¢ãã«ãšæ¯èŒããŠäžæ©åé²ããŸããã ç¬ç«ãããªããžã§ã¯ãã蚌åžçšã«äœæããããããéšåçã«ããŒã¯ã³åãããŸããã ããããã¢ã«ãŠã³ã管çãšãéã®ä»®æ³ããŒã¯ã³åã䜿çšããå®éšã®éçºã«ããããœãªã¥ãŒã·ã§ã³ã®æ¬¡ã®ããŒãžã§ã³ã®ããããã«å»¶æããããšã«ããŸããã
ãœãªã¥ãŒã·ã§ã³ã®äž»ãªæ©èœïŒ
- å¥çŽãäœæããŸãã
- EDSãšå¥çŽæžã«çœ²åããå¥çŽæ¡ä»¶ãžã®åæã確èªããŸãã
- åžå ŽäŸ¡æ ŒãããŠã³ããŒãããæ
ä¿äŸ¡å€ã®åèšç®ãéå§ããŸãã èšå®ããããããå€ããã®éžè±ã«ãããæ°ãã蚌æ éè«æ±çŸ©åãçºçããŸããã
- 矩åã®ã¹ããŒã¿ã¹ãåæ ããŸãã
æè¡é¢ã§ã¯ãåè©äŸ¡æé ãããã§æãèå³æ·±ãã§ãã 詳现ã«åæããŸãã
ããžãã¹ããã»ã¹ã§ã¯ãOracleïŒNSDã«ãã£ãŠå®è¡ããããREPO 2.0ãã®ãã€ãããïŒãæŽæ°ããã蚌åžçžå Žãã·ã¹ãã ã«ã¢ããããŒãããåŸãæé ã1æ¥ã«1åèµ·åããå¿ èŠããããŸãã
func (t *CIBContract) recalculationData(stub shim.ChaincodeStubInterface, loadData *loadDataType, curDay string) pb.Response {...}
æé ã®ã¡ã€ã³ãµã€ã¯ã«ã¯ãçžå ŽãæŽæ°ããããã¹ãŠã®èšŒåžãééããŸãã
for _, securities := range loadData.Securities {...}
次ã«ãããã€ãã®ãã§ãã¯ãå®è¡ãããŸãã ããšãã°ãåžå ŽããŒã¿ãåä¿¡ããååŒæãä»æ¥1æ¥äŒã¿ã®å Žåãåéèšã¯çºçããŸããã
if t.checkHoliday(stub, contract.Settings.Calendars) == "yes" { hisYes := historyType{curDay, "LoadData. Calendar", "System", "LoadData. Today is holiday ! No load market data to contract !"} ... contract.History = append(contract.History, hisYes) ⊠err = stub.PutState(contrID, contractJSONasBytes) }
æŽæ°ãããåµåžäŸ¡æ Œãèšç®ããããã«ãæªåã¯ãŒãã³å©åãïŒNDCïŒãèªã¿èŸŒãŸããæ£å³äŸ¡æ Œã«è¿œå ãããŸãã ãã€ãããã¯ãNKDãèšç®ããããã®30/360ã¹ããŒã ã®ãµããŒããå®è£ ããŸããã
priceIzm = float64(securities.Price + float64(securities.CouponRate)*float64((int(settlementDate.Year()) - int(dateStart.Year()))*360 + (int(settlementDate.Month()) - int(dateStart.Month()))*30 + (int(settlementDate.Day()) - int(dateStart.Day())))*100/360/100) curCurrVal = priceIzm
ååŒé貚ã蚌åžãæ瀺ãããŠããé貚ãšç°ãªãå Žåãçºæ¿æç®ãå®è¡ãããŸãã
if contract.GeneralTerms.PurchasePrice.Currency != securities.Currency { curCurrName = securities.Currency + "-" + contract.GeneralTerms.PurchasePrice.Currency for _, currency := range loadData.Currencies { if currency.Name == curCurrName { curCurrVal = priceIzm * currency.Value } } }
次ã«ãLTVãèšç®ããå¿ èŠããããŸãã ã¹ããŒãªãŒã®å€ãä¿æ°å€ãä¿æããŸãã
oldCurLTV := contract.MarginingTerms.CurrentLTV
ãã©ã³ã¶ã¯ã·ã§ã³ã®åç¶æéäžã«å®è¡ãããããŒãžã³ã³ãŒã«ãèæ ®ããå¿ èŠããããŸãã èŠä»¶ã¯ã2ã€ã®åœ¢åŒã§äž¡æ¹ããåŸãããŸãã
- 蚌åžã åãæã¯ã蚌åžã®åžå ŽäŸ¡æ Œãäžèœããå Žåã«è¿œå ã®èšŒåžãäœæããŸãã åµæš©è
ã¯ãäŸ¡æ Œãäžæããå Žåã«èšŒåžã®äžéšãè¿åŽããŸãã
- ãéã åãæã¯äºå®ããæ©ããããå®ãæ
ä¿ã§ã«ããŒãããªããªã£ãããŒã³ã®äžéšãè¿æžããŸãã 貞ãæã¯ãæ
ä¿ã®äŸ¡å€ã®å¢å ã«å¿ããŠããŒã³éé¡ãå¢ãããŸãã
æåã®ã±ãŒã¹ã§ã¯ãæ ä¿ã®æ䟡蚌åžã®éãåã«æŽæ°ãããŸãã ãããŠããããã§ãéã皌ãå ŽåãååŒã®è¿œå æ¡ä»¶ã§æå®ãããå©åããçºçãããããšãå¿ èŠã§ãã
for _, addCollateral := range contract.MarginingTerms.AddCollateral { currSumCollateral := addCollateral.Sum + (addCollateral.Sum*contract.MarginingTerms.RateOnCashMargin*float64(deltaColDate) / float64(contract.MarginingTerms.Basis))/100 ... allSumCollateral = allSumCollateral + currSumCollateral ... ht := historyType{curDay, System", "LoadData. Recalculation data(addCollateral) Contract " + contrID + " - currSumCollateral: " + strconv.FormatFloat(float64(currSumCollateral), 'f', 2, 64) ... } ... contract.History = append(contract.History, ht) }
è²·æ»ãã®åèšé¡ãèšç®ããŸããå®éãããã¯å©æ¯ã®ããããŒã³ã®é¡ã§ãããè¿æžããå¿ èŠããããŸãã
rePurchasePriceCur := contract.GeneralTerms.PurchasePrice.Sum + (contract.GeneralTerms.PurchasePrice.Sum*contract.GeneralTerms.RepoRate*float64(deltaSigningDate)/float64(contract.MarginingTerms.Basis))/100
次ã«ãLTVä¿æ°ãèšç®ããŸãã ãããè¡ãã«ã¯ãè²·ãæ»ãäŸ¡æ ŒããçŸéã§ã®èšŒåžãå·®ãåŒããçµæã®äŸ¡å€ã蚌åžå ã®èšŒåžã®åèšäŸ¡å€ã§å²ããŸãã åµæš©è ã«ãã£ãŠã¯ã¬ãžãããããéé¡ã¯ã-ãã§ããŒã¯ãããè²·ãæ»ãäŸ¡æ Œã«è¿œå ãããŸãã
contract.MarginingTerms.CurrentLTV = (rePurchasePriceCur - allSumCollateral) * float64(100) / (float64(contract.GeneralTerms.PurchasedSecurities.Quantity) * curCurrVal)
æåŸã«ãã³ã³ãã©ã¯ãã®ããªã¬ãŒãèšç®ããŸãã LTVå€ãæå®ãããã³ãªããŒãšç°ãªãå Žåãåãæé ã§ããŒãžã³ã³ãŒã«ãªãŒããŒãªããžã§ã¯ããäœæãããŸãã
contract = t.checkTriggerEvents(stub, "LoadData", contract, curDay, securities)
ãããŠãUIã«è¡šç€ºããããã®æ å ±ãå±¥æŽã«æžã蟌ã¿ãŸãã
ht := historyType{curDay, "System", "LoadData. Recalculation data(change curLTV, ADTV) Contract " + contrID + " - oldCurLTV: " + strconv.FormatFloat(float64(oldCurLTV), 'f', 2, 64) + ", newCurLTV: " + strconv.FormatFloat(float64(contract.MarginingTerms.CurrentLTV), 'f', 2, 64)...} contract.History = append(contract.History, ht)
ãŸãšãããš
ãã®ãããªã¹ããŒã ã¯ã蚌åžãå¥çŽã ãã§ãªããä»ã®ã·ããªãªã§ãæ©èœããŸãã ããšãã°ãé»åæéãç°ãªãå Žåãæéãæéãæ¥ç¶æéãç°ãªããŸãã ãŸãã¯ãã¡ã¯ã¿ãªã³ã°-ååã®åºè·ã®ã·ã°ãã«ã«ãããµãã©ã€ã€ãŒãžã®è²žãåºãã çµæžåŠã§ã¯ã誰ããæ€èšŒããå¿ èŠã®ããç¬èªã®ããŒã¿ãœãŒã¹ã䜿çšããå€ãã®ãŠãŒã¶ãŒã±ãŒã¹ããããŸãã
ç§ãã¡ã®ç®æšã¯ãéè¡ãå šåœããã³å šåœã®é¡§å®¢ãšæ¥ç¶ããã¹ããŒãå¥çŽã䜿çšããŠãæå·ã§ã¯ãªãäŒçµ±çãªçµæžã®å¥çŽã§ããéèååãèšè¿°ãããããã¯ãŒã¯ãäœæããããšã§ãã ãã®ãããªãããã¯ãŒã¯ã¯å®å®ããŠããããªãŒãã³ã§ãããP2Pãããã¯ãŒã¯ã«ããã¹ãã§ãããããããã®èª°ãç¹å¥ãªã¹ããŒã¿ã¹ãæã¡ãŸããã