第4回 Protege CellfieでExcelからFIBOへデータ取り込みをする
FIBOをProtege CellfieでExcelからデータ取り込みをする
- 1.証券トレードの全体概要
- 1-1 契約の概要
- 1-2 Contract party
- 1-3 Product services(Seller/buyer)
- 1-4 TransationとContractの関連性
- 1-5 Seller/buyer
- 1-6 Monetary Amounts and Measures
- 1-7 Exchange and interest rate
- <ExcelをRDFにするためには>
- ●Cellfieのサンプル
Cellfieでコーディングするために各classの関連性を洗い出すと以下の通りとなる。
1.証券トレードの全体概要
FiboのFIBO® Foundations Publicationドキュメントではそれぞれのメタデータの定義が細分化されているので証券売買のような特定の取引については主要なクラスをProtege等のツールを使って探し出しClassから連携するProperty(売り買い等のPredicateに相当する部分)をたどって行かないとならない。
About the FIBO Foundations Specification Version 1.2
トリプル(Subject-Predicate-Object)を正確に把握できないとProtegeによるデータ格納が不正確となりセマンティックサーチ(Sparql)が正しく動作できないこととなる。
以下で格納時のメタデータの全体像を概説する。
格納時のProtege(Cellfie)のパラメーター設定は後述する。
Transaction event is evidenced by Contract document(Figure10.103参照)
証券売買の際の全体の構成要素
項目 | 説明 | 説明カ所 |
①PartyinRole: | 定義:独立した当事者で何らかの役割を果たす特定の役割に結びつける相対的な概念、 | 1-2 Contract party |
②hasRole: | 定義:人、組織、グループ、または他のエンティティを、エンティティが何らかの関係や文脈で果たす役割に関連付けるための手段を提供する | |
③Contract: | 定義:2つ以上の関係当事者間の、自主的で、意図的で、法的に拘束力のある合意 | 1-1 契約の概要 |
解説:契約は通常書かれていますが、話されても暗示されてもよく、一般的には雇用、売却またはリース、または借家と関連しています。 | ||
定義の起源:http://www.businessdictionary.com/definition/contract.html | ||
➃hasContractParty (has contract party) | 定義:契約に署名し、契約に定義されている特定の権利と義務が付与され、契約に定義されている特定の権利を譲渡し、相手方に一定の義務を課す当事者を有する | |
⑤Buyer (buyer, purchas-er) バイヤー(バイヤー、購入者) | 定義:売買契約に基づき金銭またはその他の対価と引き換えに、所有権(商品の場合)または利益または使用(サービスの場合)を取得する、または取得することに同意する当事者 適応:http://www.businessdictionary.com/definition/buyer.html |
1-5 Seller/buyer |
⑥Product (product) | 定義:(1)有形の適切なもの、(2)製造、製造、または製造プロセスの出力または結果、または(3)流通経路を通るもの消費されるか使用される。 | 1-3 Product services(Seller/buyer) |
適応:http://www.businessdictionary.com/definition/product.html | 1-4 TransationとContractの関連性 | |
⑦AmountOfMoney (amount of money, cash) | 定義:お金の合計 解説:これは実際の金額であり、基本単位(通貨単位の10進数)が同じであるにもかかわらず、貨幣単位の金額の尺度ではありません。 | 1-6 Monetary Amounts and Measures |
1-1 契約の概要
取引の対象である債券等の金融商品tradable instrumentはContractの配下に存在し、tradable instrumentの配下にbondが存在する。
https://spec.edmcouncil.org/fibo/doc/20170930_FIBO_Primer.pdf
以下 FIBO_Primerより抜粋。
4. Appendix B Understanding SMIF UML Diagrams
1-2 Contract party
取引先であるCounterpartyはPartyinRoleのSubclassに存在する。
Fundation SPECIFICATION DOCUMENTSから抜粋。
https://www.omg.org/spec/EDMC-FIBO/FND/1.2/PDF
1-3 Product services(Seller/buyer)
売買当事者であるSeller/buyerはPartyinRoleのSubclassに存在する。
Figure 10.96 - Products and Services Class Hierarchy
1-4 TransationとContractの関連性
Figure 10.103 - Transaction Events and Confirmations
Figure 10.97 - Definition of Product – Producers and Suppliers
1-5 Seller/buyer
Seller/buyer(Class)がproduct(Object)をsell/buy(property)としてそれぞれ定義されている。
<Protegeの画面より>
Contractual product is realized by some contract.
Product とContract が結合されている。
1-6 Monetary Amounts and Measures
Figure 10.73 - Monetary Amounts and Measures
Figure 10.74 - Deprecated Class Definition for MoneyAmount
*以下Protegeのスナップショット
(Referenceの下にAmount of Moneyが存在する)
1-7 Exchange and interest rate
Price
Money amount
Figure 10.91 - QuantitiesAndUnits Ontology Overview
<ExcelをRDFにするためには>
CPTY | Instrument | Contract | Amount | Buy_Sell | |||||||
CITI | Equity | IBM | 100 | Buy | |||||||
CITI | Equity | Toyota | 100 | Sell |
●Cellfieのサンプル
(動作未確認です)
Individual: @A*(mm:hashEncode) | |||||||||||
Types: Trading | |||||||||||
Facts: has tradable debt instrument @B* | |||||||||||
has contract party @C* | |||||||||||
has amount @D*(xsd:integer) | |||||||||||
buy product (”contractual template product" is realized by contract -> CotnractによってProduct が実現される、つまりISsuerに相当する) | |||||||||||
<再掲>
●Cellfieを使わなかった場合、以下のcodingを自分でしないといけません。