public final class LoanContract extends Object implements org.joda.beans.ImmutableBean, Proratable<ProratedLoanContract>
A loan contract defines specific interest accrual terms (start date, end date, rate, day count convention) over a specific borrowed amount.
* Over the course of a contract, multiple repayments of the contract amount may occur. A borrowing always results in a new contract.
This is the standard representation but for usage within the calculation framework, a contracted must be expanded into canonical form and prorated against a single trade.
Modifier and Type | Class and Description |
---|---|
static class |
LoanContract.Builder
The bean-builder for
LoanContract . |
static class |
LoanContract.Meta
The meta-bean for
LoanContract . |
Modifier and Type | Method and Description |
---|---|
static LoanContract.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
Accrual |
getAccrual()
Gets contract accrual, fixed or floating.
|
com.google.common.collect.ImmutableList<LoanContractEvent> |
getEvents()
Gets events (Borrowing, Repayment) associated with this contract.
|
com.opengamma.strata.basics.StandardId |
getId()
Gets the internal id of this contract
|
java.time.LocalDate |
getPaymentDate()
Gets the payment date of the contract.
|
int |
hashCode() |
static LoanContract.Meta |
meta()
The meta-bean for
LoanContract . |
LoanContract.Meta |
metaBean() |
ProratedLoanContract |
prorate(com.opengamma.strata.product.ProductTrade trade)
Given a loan trade, create a prorated version of this contract by converting global quantities
into share amounts.
|
LoanContract.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public ProratedLoanContract prorate(com.opengamma.strata.product.ProductTrade trade)
prorate
in interface Proratable<ProratedLoanContract>
trade
- buy or sell trade representing a full or partial allocationpublic static LoanContract.Meta meta()
LoanContract
.public static LoanContract.Builder builder()
public LoanContract.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public com.opengamma.strata.basics.StandardId getId()
public Accrual getAccrual()
public java.time.LocalDate getPaymentDate()
Interest pays on this date. Usually identical to end date unless end date is a holiday. Payment date is given, not calculated.
public com.google.common.collect.ImmutableList<LoanContractEvent> getEvents()
A loan contract may have of zero or more events.
public LoanContract.Builder toBuilder()
Copyright © 2018. All rights reserved.