1"use strict";(self.webpackChunkactus_documentation=self.webpackChunkactus_documentation||[]).push([[2719],{9786:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>a,contentTitle:()=>r,default:()=>x,frontMatter:()=>s,metadata:()=>c,toc:()=>o});var i=n(4848),l=n(8453);const s={},r="Basic FXOUT Example",c={id:"examples/basic-contract-types/example_FXOUT",title:"Basic FXOUT Example",description:"Contract Definition",source:"@site/docs/examples/basic-contract-types/example_FXOUT.md",sourceDirName:"examples/basic-contract-types",slug:"/examples/basic-contract-types/example_FXOUT",permalink:"/docs/examples/basic-contract-types/example_FXOUT",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Basic LAX Example",permalink:"/docs/examples/basic-contract-types/example_LAX"},next:{title:"Basic FUTUR Example",permalink:"/docs/examples/basic-contract-types/example_FUTUR"}},a={},o=[{value:"Contract Definition",id:"contract-definition",level:2},{value:"Generated Events",id:"generated-events",level:2}];function d(t){const e={code:"code",h1:"h1",h2:"h2",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...t.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.h1,{id:"basic-fxout-example",children:"Basic FXOUT Example"}),"\n",(0,i.jsx)(e.h2,{id:"contract-definition",children:"Contract Definition"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-python",children:'import pandas as pd\nfrom awesome_actus_lib import FXOUT, PublicActusService\n\ncontract = FXOUT(\n contractID="fxout01",\n contractRole="RPA",\n currency="USD",\n currency2="EUR",\n maturityDate="2014-12-31T23:59:59",\n notionalPrincipal=2000,\n notionalPrincipal2=1000,\n calendar="NOCALENDAR",\n endOfMonthConvention="SD",\n statusDate="2013-12-30T00:00:00",\n contractDealDate="2013-12-20T00:00:00",\n creatorID="Creator-01",\n counterpartyID="Counterparty-01"\n)\n\nservice = PublicActusService()\nevent_stream = service.generateEvents(portfolio=contract, riskFactors=[])\nprint(event_stream.events_df)\n\n'})}),"\n",(0,i.jsx)(e.h2,{id:"generated-events",children:"Generated Events"}),"\n",(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{style:{textAlign:"left"},children:"type"}),(0,i.jsx)(e.th,{style:{textAlign:"left"},children:"time"}),(0,i.jsx)(e.th,{style:{textAlign:"right"},children:"payoff"}),(0,i.jsx)(e.th,{style:{textAlign:"left"},children:"currency"}),(0,i.jsx)(e.th,{style:{textAlign:"right"},children:"nominalValue"}),(0,i.jsx)(e.th,{style:{textAlign:"right"},children:"nominalRate"}),(0,i.jsx)(e.th,{style:{textAlign:"right"},children:"nominalAccrued"}),(0,i.jsx)(e.th,{style:{textAlign:"left"},children:"contractId"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{style:{textAlign:"left"},children:"MD"}),(0,i.jsx)(e.td,{style:{textAlign:"left"},children:"2014-12-31T23:59:59"}),(0,i.jsx)(e.td,{style:{textAlign:"right"},children:"2000"}),(0,i.jsx)(e.td,{style:{textAlign:"left"},children:"USD"}),(0,i.jsx)(e.td,{style:{textAlign:"right"},children:"0"}),(0,i.jsx)(e.td,{style:{textAlign:"right"},children:"0"}),(0,i.jsx)(e.td,{style:{textAlign:"right"},children:"0"}),(0,i.jsx)(e.td,{style:{textAlign:"left"},children:"fxout01"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{style:{textAlign:"left"},children:"MD"}),(0,i.jsx)(e.td,{style:{textAlign:"left"},children:"2014-12-31T23:59:59"}),(0,i.jsx)(e.td,{style:{textAlign:"right"},children:"-1000"}),(0,i.jsx)(e.td,{style:{textAlign:"left"},children:"EUR"}),(0,i.jsx)(e.td,{style:{textAlign:"right"},children:"0"}),(0,i.jsx)(e.td,{style:{textAlign:"right"},children:"0"}),(0,i.jsx)(e.td,{style:{textAlign:"right"},children:"0"}),(0,i.jsx)(e.td,{style:{textAlign:"left"},children:"fxout01"})]})]})]})]})}function x(t={}){const{wrapper:e}={...(0,l.R)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(d,{...t})}):d(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>r,x:()=>c});var i=n(6540);const l={},s=i.createContext(l);function r(t){const e=i.useContext(s);return i.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function c(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(l):t.components||l:r(t.components),i.createElement(s.Provider,{value:e},t.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.