public final class HistoricalRequestBuilder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HistoricalRequestBuilder.Days
Defines what days are returned in historical requests (weekdays only, all days etc.).
|
static class |
HistoricalRequestBuilder.Fill
Defines what values are returned when a field has no value on a specific date.
|
static class |
HistoricalRequestBuilder.Period
Defines the period used for historical data requests (daily, weekly etc.).
|
static class |
HistoricalRequestBuilder.PeriodicityAdjustment
Defines the periodicity adjustment.
|
Constructor and Description |
---|
HistoricalRequestBuilder(Collection<String> tickers,
Collection<String> fields,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate)
Creates a HistoricalRequestBuilder with standard options.
|
HistoricalRequestBuilder(Collection<String> tickers,
String field,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate)
Equivalent to calling
new HistoricalRequestBuilder(tickers, Arrays.asList(field), startDate, endDate);
|
HistoricalRequestBuilder(String ticker,
Collection<String> fields,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate)
Equivalent to calling
new HistoricalRequestBuilder(Arrays.asList(ticker), fields, startDate, endDate);
|
HistoricalRequestBuilder(String ticker,
String field,
org.joda.time.DateTime startDate,
org.joda.time.DateTime endDate)
Equivalent to calling
new HistoricalRequestBuilder(Arrays.asList(ticker), Arrays.asList(field), startDate, endDate);
|
Modifier and Type | Method and Description |
---|---|
HistoricalRequestBuilder |
adjustAbnormalDistributions()
Adjust historical pricing to reflect: Special Cash, Liquidation, Capital Gains, Long-Term Capital Gains,
Short-Term Capital Gains, Memorial, Return of Capital, Rights Redemption, Miscellaneous, Return Premium,
Preferred Rights Redemption, Proceeds/Rights, Proceeds/Shares, Proceeds/ Warrants.
|
HistoricalRequestBuilder |
adjustDefault()
Adjust historical pricing based on the DPDF
|
HistoricalRequestBuilder |
adjustNormalDistributions()
Adjust historical pricing to reflect: Regular Cash, Interim, 1st Interim, 2nd Interim, 3rd Interim, 4th Interim,
5th Interim, Income, Estimated, Partnership Distribution, Final, Interest on Capital, Distribution, Prorated.
|
HistoricalRequestBuilder |
adjustSplits()
Adjust historical pricing and/or volume are adjusted to reflect: Spin-Offs, Stock Splits/Consolidations, Stock
Dividend/Bonus, Rights Offerings/ Entitlement.
|
protected void |
buildRequest(com.bloomberglp.blpapi.Request request) |
com.bloomberglp.blpapi.Request |
buildRequest(com.bloomberglp.blpapi.Session session) |
HistoricalRequestBuilder |
currency(Currency currency) |
HistoricalRequestBuilder |
days(HistoricalRequestBuilder.Days days)
Sets to include/exclude non trading days where no data was generated.
|
HistoricalRequestBuilder |
fill(HistoricalRequestBuilder.Fill fill)
If data is to be displayed for non trading days what is the data to be returned.
|
BloombergRequestType |
getRequestType() |
ResultParser<HistoricalData> |
getResultParser() |
BloombergServiceType |
getServiceType() |
HistoricalRequestBuilder |
maxPoints(int maxPoints) |
HistoricalRequestBuilder |
period(HistoricalRequestBuilder.Period period) |
HistoricalRequestBuilder |
periodicityAdjusment(HistoricalRequestBuilder.PeriodicityAdjustment periodicityAdjusment)
Sets the period and calendar type of the output.
|
String |
toString() |
public HistoricalRequestBuilder(String ticker, String field, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate)
new HistoricalRequestBuilder(Arrays.asList(ticker), Arrays.asList(field), startDate, endDate);
public HistoricalRequestBuilder(String ticker, Collection<String> fields, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate)
new HistoricalRequestBuilder(Arrays.asList(ticker), fields, startDate, endDate);
public HistoricalRequestBuilder(Collection<String> tickers, String field, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate)
new HistoricalRequestBuilder(tickers, Arrays.asList(field), startDate, endDate);
public HistoricalRequestBuilder(Collection<String> tickers, Collection<String> fields, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate)
tickers
- a collection of tickers for which data needs to be retrieved - tickers must be valid Bloomberg
symbols (for example: IBM US Equity)fields
- a collection of Bloomberg fields to retrieve for each tickerstartDate
- the start of the date range (inclusive) for which to retrieve dataendDate
- the end of the date range (inclusive) for which to retrieve data
NullPointerException
- if any of the parameters is null or if the collections contain null itemsIllegalArgumentException
- if public HistoricalRequestBuilder periodicityAdjusment(HistoricalRequestBuilder.PeriodicityAdjustment periodicityAdjusment)
public HistoricalRequestBuilder period(HistoricalRequestBuilder.Period period)
period
- Sets the period of the output. To be used in conjunction with Period Adjustment.public HistoricalRequestBuilder currency(Currency currency)
currency
- Sets the currency in which the values are returnedpublic HistoricalRequestBuilder days(HistoricalRequestBuilder.Days days)
public HistoricalRequestBuilder fill(HistoricalRequestBuilder.Fill fill)
public HistoricalRequestBuilder maxPoints(int maxPoints)
maxPoints
- Sets the maximum number of data points to return.
IllegalArgumentException
- if the number of points is negativepublic HistoricalRequestBuilder adjustDefault()
public HistoricalRequestBuilder adjustAbnormalDistributions()
public HistoricalRequestBuilder adjustNormalDistributions()
public HistoricalRequestBuilder adjustSplits()
public BloombergServiceType getServiceType()
public BloombergRequestType getRequestType()
protected void buildRequest(com.bloomberglp.blpapi.Request request)
request
- an empty Request that needs to be populatedpublic ResultParser<HistoricalData> getResultParser()
public com.bloomberglp.blpapi.Request buildRequest(com.bloomberglp.blpapi.Session session)
buildRequest
in interface RequestBuilder<T extends RequestResult>
session
- the session to which the request will be sentCopyright © 2013. All Rights Reserved.