### Initialize Git Repository Source: https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md Run this command in your FIBO installation directory if the .git/hooks directory does not exist. ```bash git init ``` -------------------------------- ### FIBO Standard IRI Format - Example Usage Source: https://github.com/edmcouncil/fibo/blob/master/ONTOLOGY_GUIDE.md Provides a concrete example of a non-versioned resource IRI following the FIBO standard format. ```text https://spec.edmcouncil.org/fibo/ontology/BE/LegalEntities/LegalPersons/LegalEntity ``` -------------------------------- ### Example RDF Class Definition Source: https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md This is an example of a class definition within an RDF file, used for testing serialization. ```xml ``` -------------------------------- ### FIBO Standard IRI Format Example Source: https://github.com/edmcouncil/fibo/blob/master/ONTOLOGY_GUIDE.md Illustrates the standard pattern for non-versioned resource IRIs in FIBO ontologies. ```text https://spec.edmcouncil.org/fibo/ontology///.../// ``` -------------------------------- ### Load FIBO for Local Reasoning (Bash) Source: https://context7.com/edmcouncil/fibo/llms.txt This script outlines the steps to clone the FIBO repository, generate necessary catalog and About files using the dev toolkit, and load the production or development release into Protégé. It also includes an example of running a SPARQL query against loaded data using Apache Jena ARQ. ```bash # Step 1: Clone the repository git clone https://github.com/edmcouncil/fibo.git cd fibo # Step 2: Generate catalog and About files using the dev toolkit # (requires Bash and Java 11+) cd etc/dev_toolkit ./createCatalog.sh # creates catalog-v001.xml (needed only for new/renamed files) ./createAbout.sh # regenerates AboutFIBOProd.rdf and AboutFIBODev.rdf # Step 3a: Load PRODUCTION release (Release-maturity ontologies only) in Protégé # File > Open > Select: AboutFIBOProd.rdf # Protégé will use catalog-v001.xml to resolve all owl:imports to local files # Step 3b: Load DEVELOPMENT release (Release + Provisional + Informative) in Protégé # File > Open > Select: AboutFIBODev.rdf # Step 4: Run SPARQL query via Apache Jena ARQ against a loaded dataset # (Example: load into an in-memory dataset and query) riot --output=TURTLE AboutFIBOProd.rdf > fibo-prod.ttl sparql --data fibo-prod.ttl --query - <<'SPARQL' PREFIX rdfs: PREFIX skos: PREFIX fibo-fbc-fi-fi: SELECT ?class ?label ?definition WHERE { ?class rdfs:subClassOf fibo-fbc-fi-fi:FinancialInstrument . ?class rdfs:label ?label . ?class skos:definition ?definition . } ORDER BY ?label SPARQL ``` -------------------------------- ### Configure JAVA_HOME in pre-commit hook Source: https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md Edit the pre-commit file to point to your Java JRE/JDK installation. Ensure it's Java 11 or higher. ```bash JAVA_HOME=/path/to/your/java/jdk export JAVA_HOME ``` -------------------------------- ### Example RDF Restriction Modification Source: https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md Demonstrates changing a restriction and removing cardinality in an RDF file for serialization testing. ```xml &fibo-fnd-rel-rel;holds ``` -------------------------------- ### Browse FIBO Concepts Online (Web Viewer) Source: https://context7.com/edmcouncil/fibo/llms.txt Access FIBO concepts directly through web URLs without local installation. Use the base URL for general browsing or specific concept IRIs for detailed views. ```text # Browse any FIBO concept online without loading the ontology locally: # Base URL: https://spec.edmcouncil.org/fibo/ontology # Domain landing pages: https://spec.edmcouncil.org/fibo/ontology/BE/MetadataBE/BEDomain https://spec.edmcouncil.org/fibo/ontology/FBC/MetadataFBC/FBCDomain https://spec.edmcouncil.org/fibo/ontology/SEC/MetadataSEC/SECDomain https://spec.edmcouncil.org/fibo/ontology/DER/MetadataDER/DERDomain https://spec.edmcouncil.org/fibo/ontology/IND/MetadataIND/INDDomain https://spec.edmcouncil.org/fibo/ontology/LOAN/MetadataLOAN/LOANDomain https://spec.edmcouncil.org/fibo/ontology/FND/MetadataFND/FNDDomain # Individual concept lookup (replace trailing path with any FIBO IRI): https://spec.edmcouncil.org/fibo/ontology/BE/LegalEntities/LegalPersons/LegalEntity https://spec.edmcouncil.org/fibo/ontology/SEC/Securities/SecuritiesIdentification/InternationalSecuritiesIdentificationNumber https://spec.edmcouncil.org/fibo/ontology/DER/DerivativesContracts/DerivativesBasics/ContractForDifference https://spec.edmcouncil.org/fibo/ontology/FBC/FinancialInstruments/FinancialInstruments/DebtInstrument https://spec.edmcouncil.org/fibo/ontology/IND/InterestRates/InterestRates/BaseRate ``` -------------------------------- ### Define OWL Object Property in FIBO (RDF/XML) Source: https://context7.com/edmcouncil/fibo/llms.txt This pattern defines an OWL object property, specifying its label, definition, and potentially its domain and range (though not shown in these examples). ```xml issues formally puts into circulation, publishes, or distributes causes relationship between an event or set of events or factors (the cause) and a second event, phenomenon, or result (the effect), where the second is understood as a consequence of the first is based on indicates the reference rate or benchmark upon which this rate is calculated ``` -------------------------------- ### Create About Files Source: https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md Run this shell command to create AboutFIBOProd.rdf or AboutFIBODev.rdf files. This process can take a while and should be re-run when file maturity levels, base URIs, or file additions/deletions occur. ```bash ./createAbout.sh ``` -------------------------------- ### Create Catalog File Source: https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md Run this shell command to create a catalog file for use with Protégé or CCM. This should be re-run when new files are added or base URIs are changed. ```bash ./createCatalog.sh ``` -------------------------------- ### SPARQL: Find Market Data Temporal Classes Source: https://context7.com/edmcouncil/fibo/llms.txt Queries for all market data temporal classes and their definitions within the FIBO ontology. Requires the rdfs and skos prefixes. ```sparql # SPARQL: find all market data temporal classes and their definitions PREFIX rdfs: PREFIX skos: SELECT ?class ?label ?definition WHERE { ?class rdfs:label ?label . OPTIONAL { ?class skos:definition ?definition . } FILTER(STRSTARTS(STR(?class), "https://spec.edmcouncil.org/fibo/ontology/MD/")) } ORDER BY ?label ``` -------------------------------- ### Define Simple OWL Class in FIBO (RDF/XML) Source: https://context7.com/edmcouncil/fibo/llms.txt Use this pattern to define a basic OWL class with labels, definitions, and annotations. Ensure correct namespace prefixes are used. ```xml financial instrument written contract that gives rise to both a financial asset of one entity and a financial liability or equity instrument of another entity ISO 32000-1 FI ``` -------------------------------- ### FIBO Foundations (FND) Core Classes in Turtle Source: https://context7.com/edmcouncil/fibo/llms.txt This Turtle snippet shows core FND class hierarchies, including Contract, WrittenContract, TransferableContract, MonetaryAmount, and Currency. Load using AboutFIBOProd.rdf or FND/Agreements/Contracts.rdf. ```turtle # Turtle snippet showing core FND class hierarchies as they appear after loading # Load: AboutFIBOProd.rdf or FND/Agreements/Contracts.rdf directly PREFIX fibo-fnd-agr-ctr: PREFIX fibo-fnd-acc-cur: PREFIX rdfs: PREFIX skos: # Key FND classes fibo-fnd-agr-ctr:Contract rdfs:label "contract" ; skos:definition "binding agreement between two or more parties that is enforceable by law" . fibo-fnd-agr-ctr:WrittenContract rdfs:subClassOf fibo-fnd-agr-ctr:Contract . fibo-fnd-agr-ctr:TransferableContract rdfs:subClassOf fibo-fnd-agr-ctr:WrittenContract . # basis for most financial instruments fibo-fnd-acc-cur:MonetaryAmount rdfs:label "monetary amount" ; skos:definition "measure that is an amount of money specified in monetary units" . fibo-fnd-acc-cur:Currency rdfs:subClassOf ; rdfs:label "currency" . ``` -------------------------------- ### FIBO Namespace Prefix Format Source: https://github.com/edmcouncil/fibo/blob/master/ONTOLOGY_GUIDE.md Specifies the standard pattern for namespace prefixes used in FIBO ontologies. ```text fibo---...-- ``` -------------------------------- ### FIBO Ontology Header (RDF/XML) Source: https://context7.com/edmcouncil/fibo/llms.txt This is the canonical header pattern for FIBO ontologies. It includes essential metadata like labels, abstracts, licenses, versioning information, maturity levels, copyright statements, and owl:imports. ```xml ]> My Ontology Label Short description of ontology scope and purpose. Copyright (c) 2025 EDM Council, Inc. ... Copyright (c) 2025 EDM Council, Inc. Copyright (c) 2025 Object Management Group, Inc. The .../20251001/... version was modified to ... ``` ``` -------------------------------- ### Define Reference Interest Rate Class - Turtle Source: https://context7.com/edmcouncil/fibo/llms.txt Illustrates the definition of a 'ReferenceInterestRate' class and its subclasses in RDF/XML format. Use this for defining benchmark interest rates. ```turtle # RDF/XML excerpt from IND/InterestRates/InterestRates.rdf # Illustrates class definitions and named individuals reference interest rate interest rate benchmark used as the basis upon which other interest rates or financial instrument prices are set base rate basic rate of interest on which the actual rate a bank charges on loans to its customers is calculated BBR bank base rate 1 five years P5Y ``` -------------------------------- ### RDF/XML: Securities Issuance Process Class Source: https://context7.com/edmcouncil/fibo/llms.txt Defines the 'securities issuance process' class in RDF/XML, including its label and definition. ```rdf # RDF/XML excerpt from BP/SecuritiesIssuance/IssuanceProcess.rdf securities issuance process process by which a security is created and distributed to investors through an underwriter or directly ``` -------------------------------- ### Retrieve Derivative Instrument Types with Cashflow and Settlement Terms (SPARQL) Source: https://context7.com/edmcouncil/fibo/llms.txt This SPARQL query retrieves derivative instrument types, their labels, and definitions, focusing on those that are subclasses of DerivativeInstrument. It helps in understanding the structure of derivative contracts. ```sparql # SPARQL: retrieve derivative instrument types with their cashflow and settlement terms PREFIX fibo-der-drc-bsc: PREFIX fibo-fbc-fi-fi: PREFIX rdfs: PREFIX skos: SELECT ?class ?label ?definition WHERE { ?class rdfs:subClassOf+ fibo-fbc-fi-fi:DerivativeInstrument . ?class rdfs:label ?label . OPTIONAL { ?class skos:definition ?definition . } FILTER(STRSTARTS(STR(?class), "https://spec.edmcouncil.org/fibo/")) } ORDER BY ?label # Key DER classes (from DER/DerivativesContracts/DerivativesBasics.rdf): # # fibo-der-drc-bsc:ContractForDifference # – cash-settled; parties exchange difference between initial and final underlying value # – abbreviation: CFD # – adapted from ISO 10962:2019 (CFI code) # # fibo-der-drc-bsc:CreditDerivative # – OTC bilateral; creditor transfers default risk to third party for a premium # – examples: CDS, CDO, total return swaps, credit spread options # # fibo-der-drc-bsc:CashflowFormula ``` -------------------------------- ### Find FIBO Financial Instrument Types and Definitions (SPARQL) Source: https://context7.com/edmcouncil/fibo/llms.txt Use this SPARQL query to find all FIBO financial instrument types, their labels, and definitions. Ensure the FIBO ontology is accessible. ```sparql # SPARQL: find all FIBO financial instrument types with their definitions PREFIX fibo-fbc-fi-fi: PREFIX rdfs: PREFIX skos: PREFIX owl: SELECT ?instrument ?label ?definition WHERE { ?instrument rdfs:subClassOf+ fibo-fbc-fi-fi:FinancialInstrument . ?instrument rdfs:label ?label . ?instrument skos:definition ?definition . FILTER(STRSTARTS(STR(?instrument), "https://spec.edmcouncil.org/fibo/")) } ORDER BY ?label # Key FBC financial instrument classes: # fibo-fbc-fi-fi:CashInstrument – determined by market; highly liquid # fibo-fbc-fi-fi:DebtInstrument – credit agreement; has hasBorrower, hasLender # fibo-fbc-fi-fi:DerivativeInstrument – value derived from an underlier # fibo-fbc-fi-fi:CommodityInstrument – ownership interest in bulk goods # fibo-fbc-fi-fi:CurrencyInstrument – used for currency trading; hasBuyingCurrency, hasSellingCurrency # fibo-fbc-fi-fi:CalculationAgent – party responsible for determining instrument value # Maturity-level triple (used on every ontology): # # fibo-fnd-utl-av:hasMaturityLevel fibo-fnd-utl-av:Release . ``` -------------------------------- ### Commit Changes in Sourcetree Source: https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md Steps to commit a modified file using Sourcetree, including staging and entering a commit message. ```bash Stage Selected Commit ``` -------------------------------- ### Query Securities Identification Schemes and Identifier Types (SPARQL) Source: https://context7.com/edmcouncil/fibo/llms.txt This SPARQL query retrieves securities identification schemes, their labels, abbreviations, and definitions. It focuses on classes that are subclasses of SecurityIdentifier. ```sparql # SPARQL: query for securities identification schemes and their associated identifier types PREFIX fibo-sec-sec-id: PREFIX rdfs: PREFIX skos: PREFIX cmns-av: SELECT ?idClass ?label ?abbreviation ?definition WHERE { ?idClass rdfs:subClassOf+ fibo-sec-sec-id:SecurityIdentifier . ?idClass rdfs:label ?label . OPTIONAL { ?idClass cmns-av:abbreviation ?abbreviation . } OPTIONAL { ?idClass skos:definition ?definition . } } ORDER BY ?label # ISIN structure from SEC/Securities/SecuritiesIdentification.rdf: # # # # # # # international securities identification number # ISIN # # # Key identifier classes: # fibo-sec-sec-id:InternationalSecuritiesIdentificationNumber (ISIN, ISO 6166) # fibo-sec-sec-id:NationalSecuritiesIdentifyingNumber (NSIN / CUSIP) # fibo-sec-sec-id:ListedSecurityIdentifier – registered by an Exchange # fibo-sec-sec-id:NationalNumberingAgency (NNA) ``` -------------------------------- ### RDF/XML: Corporate Action Classes Source: https://context7.com/edmcouncil/fibo/llms.txt Defines classes for corporate actions, including general, mandatory, and voluntary types, with labels and definitions. ```rdf corporate action event initiated by a public company that may affect its securities, shareholders, or bondholders ``` ```rdf mandatory corporate action corporate action that affects all holders of the security and requires no decision on the part of the holder Examples include stock splits, reverse stock splits, mergers, spin-offs, and certain dividend payments. ``` ```rdf voluntary corporate action corporate action that requires a decision by the security holder Examples include tender offers and rights issues. ``` -------------------------------- ### Set Maturity Level in FIBO Ontology (XML) Source: https://context7.com/edmcouncil/fibo/llms.txt Annotate FIBO ontologies with maturity levels like Release, Provisional, or Informative. These annotations control the publication stream and are used in automated tests and development inclusion. ```xml ``` -------------------------------- ### Define OWL Subclass with Cardinality Restrictions (RDF/XML) Source: https://context7.com/edmcouncil/fibo/llms.txt This pattern defines a subclass with specific cardinality constraints on its properties, typical for FIBO. It ensures that certain properties are present exactly once. ```xml 1 1 international securities identification number ISIN security identifier that is defined as specified in ISO 6166 ``` -------------------------------- ### Retrieve Loan Properties - SPARQL Source: https://context7.com/edmcouncil/fibo/llms.txt SPARQL query to retrieve loan-specific properties, their labels, and definitions. Use this to query for common loan attributes. ```sparql # SPARQL: retrieve loan-specific properties and their domains/ranges PREFIX fibo-loan-ln-ln: PREFIX fibo-fbc-dae-dbt: PREFIX rdfs: PREFIX skos: PREFIX owl: SELECT ?property ?label ?definition WHERE { VALUES ?property { fibo-loan-ln-ln:hasFirstRateChangeTerm fibo-loan-ln-ln:hasBalloonPayment fibo-fbc-dae-dbt:hasBorrower fibo-fbc-dae-dbt:hasLender fibo-fbc-dae-dbt:hasPrincipalAmount } OPTIONAL { ?property rdfs:label ?label . } OPTIONAL { ?property skos:definition ?definition . } } # Loan class hierarchy (from LOAN/LoansGeneral/Loans.rdf): # fibo-loan-ln-ln:Loan # rdfs:subClassOf fibo-fbc-dae-dbt:Debt # rdfs:subClassOf fibo-fbc-fi-fi:DebtInstrument # # Key loan subtypes: # LOAN/RealEstateLoans/Mortgages.rdf → Mortgage, FixedRateMortgage, AdjustableRateMortgage # LOAN/RealEstateLoans/ConstructionLoans.rdf → ConstructionLoan # LOAN/LoansSpecific/CommercialLoans.rdf → CommercialLoan # LOAN/LoansSpecific/StudentLoans.rdf → StudentLoan # LOAN/LoansSpecific/CardAccounts.rdf → CreditCardAccount # LOAN/LoansSpecific/GreenLoans.rdf → GreenLoan ``` -------------------------------- ### SPARQL: Retrieve ACTUS Contract Type Mappings Source: https://context7.com/edmcouncil/fibo/llms.txt Retrieves ACTUS contract types that are equivalent to FIBO classes, along with their labels. Requires specific FIBO and OWL prefixes. ```sparql # SPARQL: retrieve ACTUS contract type mappings to FIBO equivalents PREFIX fibo-actus-acv: PREFIX owl: PREFIX rdfs: PREFIX skos: SELECT ?actusType ?fiboEquivalent ?label WHERE { ?actusType owl:equivalentClass ?fiboEquivalent . OPTIONAL { ?actusType rdfs:label ?label . } FILTER(STRSTARTS(STR(?actusType), "https://spec.edmcouncil.org/fibo/ontology/ACTUS/")) } ORDER BY ?label ``` -------------------------------- ### Indicating Ontology Maturity Level in RDF Source: https://github.com/edmcouncil/fibo/blob/master/CONTRIBUTING.md This RDF triple indicates the maturity level of an ontology. Use this format to set the maturity level for any FIBO ontology. ```turtle fibo-bp-iss-doc: fibo-fnd-utl-av:hasMaturityLevel fibo-fnd-utl-av:Provisional . ``` -------------------------------- ### FIBO Namespace Prefix Convention in Turtle Source: https://context7.com/edmcouncil/fibo/llms.txt Defines standard SPARQL/Turtle prefixes for FIBO ontologies and commonly imported external standards. Ensure these prefixes are used consistently when querying or defining FIBO data. ```turtle # Standard FIBO namespace prefix pattern: # fibo--- PREFIX fibo-be-le-lp: PREFIX fibo-fbc-fi-fi: PREFIX fibo-fnd-agr-ctr: PREFIX fibo-fnd-acc-cur: PREFIX fibo-der-drc-bsc: PREFIX fibo-sec-sec-id: PREFIX fibo-ind-ir-ir: PREFIX fibo-loan-ln-ln: # External standards always imported by FIBO: PREFIX cmns-av: PREFIX cmns-org: PREFIX cmns-dt: PREFIX cmns-pts: PREFIX skos: PREFIX dct: ``` -------------------------------- ### Define Disjoint OWL Classes in FIBO (RDF/XML) Source: https://context7.com/edmcouncil/fibo/llms.txt Use this pattern to declare classes as disjoint, ensuring that instances of one class cannot be instances of the other. This enforces mutual exclusivity. ```xml profit objective objective that reflects pursuit of a financial benefit ... for profit objective profit motive ``` -------------------------------- ### SPARQL Query for FIBO Business Entities (BE) Legal Entities Source: https://context7.com/edmcouncil/fibo/llms.txt This SPARQL query retrieves all subclasses of LegalEntity within the FIBO BE domain, including their labels and definitions. Run this query against a triplestore loaded with AllBE.rdf. ```sparql # SPARQL query to retrieve all subclasses of LegalEntity in FIBO BE # Run against a triplestore loaded with AllBE.rdf PREFIX owl: PREFIX rdfs: PREFIX skos: PREFIX cmns-org: SELECT ?class ?label ?definition WHERE { ?class rdfs:subClassOf+ cmns-org:LegalEntity . ?class rdfs:label ?label . OPTIONAL { ?class skos:definition ?definition . } FILTER(STRSTARTS(STR(?class), "https://spec.edmcouncil.org/fibo/")) } ORDER BY ?label # Key classes in BE/LegalEntities/LegalPersons.rdf: # fibo-be-le-lp:BusinessEntity – formed and administered under commercial law # fibo-be-le-lp:LegallyCompetentNaturalPerson – person competent to enter contracts # fibo-be-le-lp:SpecialPurposeVehicle – SPV, with optional intended liquidation date # fibo-be-le-lp:CharteredLegalPerson – created by royal charter or decree # fibo-be-le-lp:BusinessLicense – license tied to a jurisdiction via isRecognizedIn # RDF/XML definition pattern (from BE/LegalEntities/LegalPersons.rdf): # # # # business entity # entity that is formed and administered as per commercial law # in order to engage in business activities # ```