QBbgLib  0.4
Qt wrapper for the Bloomberg API
Public Types | Public Member Functions | Properties | List of all members
QBbgLib::QBbgHistoricalDataRequest Class Reference

An historical request. More...

#include <QBbgHistoricalDataRequest.h>

Inheritance diagram for QBbgLib::QBbgHistoricalDataRequest:
QBbgLib::QBbgAbstractFieldRequest QBbgLib::QBbgAbstractRequest

Public Types

enum  NonTradingDayFill { NON_TRADING_WEEKDAYS, ALL_CALENDAR_DAYS, ACTIVE_DAYS_ONLY }
 Policy to handle non-trading days. More...
 
enum  PeriodAdjustment { ACTUAL, CALENDAR, FISCAL }
 Determine the frequency and calendar type of the output. More...
 
enum  PeriodSelection {
  DAILY, WEEKLY, MONTHLY, QUARTERLY,
  SEMI_ANNUALLY, YEARLY
}
 Frequency of historical data. More...
 
- Public Types inherited from QBbgLib::QBbgAbstractRequest
enum  RequestType : qint32 {
  RequestType::Invalid = -1, RequestType::Beqs, RequestType::HistoricalData = FirstFielded, RequestType::ReferenceData,
  RequestType::PortfolioData, RequestType::IntraDayTick = FirstIntraday, RequestType::IntraDayBar
}
 Type of Request. More...
 
enum  SpecialIDs { InvalidID = -1024 }
 Special requestID codes. More...
 

Public Member Functions

 QBbgHistoricalDataRequest ()
 Creates an empty historical data request. More...
 
 QBbgHistoricalDataRequest (const QBbgHistoricalDataRequest &a)
 Creates a copy of another historical data request. More...
 
virtual ~QBbgHistoricalDataRequest ()
 Destructor. More...
 
virtual bool adjustmentAbnormal () const
 
virtual bool adjustmentFollowDPDF () const
 
virtual bool adjustmentNormal () const
 
virtual bool adjustmentSplit () const
 
virtual QString calendarCode () const
 
virtual QString currency () const
 
virtual const QDate & endDate () const
 The last date of the period to retrieve data. More...
 
virtual bool fillWithNull () const
 
virtual bool isValidReq () const
 Reimplemented from QBbgAbstractRequest::isValidReq() More...
 
virtual qint32 maxDataPoints () const
 
virtual NonTradingDayFill nonTradingDayFill () const
 
virtual QBbgHistoricalDataRequestoperator= (const QBbgHistoricalDataRequest &a)
 Copies another historical data request. More...
 
virtual bool operator== (const QBbgHistoricalDataRequest &a) const
 Checks if two requests are identical. More...
 
virtual PeriodAdjustment periodicityAdjustment () const
 
virtual PeriodSelection periodicitySelection () const
 
virtual void setAdjustmentAbnormal (bool val)
 
virtual void setAdjustmentFollowDPDF (bool val)
 
virtual void setAdjustmentNormal (bool val)
 
virtual void setAdjustmentSplit (bool val)
 
virtual void setCalendarCode (QString val)
 
virtual void setCurrency (QString val)
 
virtual void setEndDate (const QDate &val)
 Set the last date of the period to retrieve data. More...
 
virtual void setFillWithNull (bool val)
 
virtual void setMaxDataPoints (qint32 val)
 
virtual void setNonTradingDayFill (NonTradingDayFill val)
 
virtual void setPeriodicityAdjustment (PeriodAdjustment val)
 
virtual void setPeriodicitySelection (QBbgHistoricalDataRequest::PeriodSelection val)
 
virtual void setSecurity (const QBbgSecurity &val)
 Reimplemented from QBbgAbstractRequest::setSecurity() More...
 
virtual void setStartDate (const QDate &val)
 Set the first date of the period to retrieve data. More...
 
virtual void setUseClosePrice (bool val)
 
virtual void setUsePriceForPricing (bool val)
 
virtual void setUseRelativeDate (bool val)
 
virtual const QDate & startDate () const
 The first date of the period to retrieve data. More...
 
virtual bool useClosePrice () const
 
virtual bool usePriceForPricing () const
 
virtual bool useRelativeDate () const
 
- Public Member Functions inherited from QBbgLib::QBbgAbstractFieldRequest
virtual ~QBbgAbstractFieldRequest ()=0
 Destructor. More...
 
virtual void clearOverrides ()
 Remove all overrides from a request. More...
 
virtual const QString & field () const
 The field related to the request. More...
 
virtual QBbgAbstractFieldRequestoperator= (const QBbgAbstractFieldRequest &a)
 Copies another request. More...
 
virtual bool operator== (const QBbgAbstractFieldRequest &a) const
 Checks if two requests are identical. More...
 
virtual const QBbgOverrideoverrides () const
 Returns the set of overrides applied to the request. More...
 
virtual void setField (const QString &val)
 Sets the field for the request. More...
 
virtual void setOverrides (const QBbgOverride &Overr)
 Sets the overrides to apply to the request. More...
 
- Public Member Functions inherited from QBbgLib::QBbgAbstractRequest
virtual ~QBbgAbstractRequest ()=0
 Destructor. More...
 
virtual qint64 getID () const
 Returns the current ID for the request. More...
 
virtual QBbgAbstractRequestoperator= (const QBbgAbstractRequest &other)
 Copies another request. More...
 
virtual bool operator== (const QBbgAbstractRequest &other) const
 Checks if two requests are identical. More...
 
virtual RequestType requestType () const
 Returns the type of request. More...
 
virtual const QBbgSecuritysecurity () const
 Returns the security associated with the request. More...
 
virtual void setID (qint64 val)
 Set the ID associated to the current request. More...
 
virtual void setSecurity (const QString &SecName, QBbgSecurity::YellowKeys SecKey)
 Overloaded from setSecurity. More...
 

Properties

bool adjustmentAbnormal
 Adjusts for Abnormal Cash Dividends. More...
 
bool adjustmentFollowDPDF
 Adjustments based on DPDF. More...
 
bool adjustmentNormal
 Adjust for "change on day". More...
 
bool adjustmentSplit
 Adjustments based on Capital Changes. More...
 
QString calendarCode
 Returns the data based on the calendar of the specified country, exchange, or religion. More...
 
QString currency
 Amends the value from local to desired currency. More...
 
QDate endDate
 The end date of the period to retrieve data. More...
 
bool fillWithNull
 If data is to be displayed for non trading days what is the data to be returned. More...
 
qint32 maxDataPoints
 Maximum number of data points to return. More...
 
NonTradingDayFill nonTradingDayFill
 Sets to include/exclude non trading days where no data was generated. More...
 
PeriodAdjustment periodicityAdjustment
 Determine the frequency and calendar type of the output. To be used in conjunction with periodicitySelection. More...
 
PeriodSelection periodicitySelection
 Determine the frequency of the output. To be used in conjunction with periodicityAdjustment. More...
 
QDate startDate
 The first date of the period to retrieve data. More...
 
bool useClosePrice
 Indicates whether to use the average or the closing price in quote calculation. More...
 
bool usePriceForPricing
 Sets quote to Price or Yield for a debt instrument whose default value is quoted in yield. More...
 
bool useRelativeDate
 Returns data with a relative date. More...
 
- Properties inherited from QBbgLib::QBbgAbstractFieldRequest
QString field
 The field associated with the request. More...
 
QBbgOverride overrides
 The overrides applied to the request. More...
 
- Properties inherited from QBbgLib::QBbgAbstractRequest
bool isValidReq
 Checks if the request is valid. More...
 
qint64 requestID
 The request unique identifier. More...
 
RequestType requestType
 The type of the request. More...
 
QBbgSecurity security
 The security associated with the request. More...
 

Additional Inherited Members

Detailed Description

An historical request.

This class can be used to query historical data from Bloomberg.
This is equivalent to BDH() Bloomberg function in excel.

Member Enumeration Documentation

Policy to handle non-trading days.

Enumerator
NON_TRADING_WEEKDAYS 

Show only weekdays

ALL_CALENDAR_DAYS 

Show all days

ACTIVE_DAYS_ONLY 

Show only trading days

Determine the frequency and calendar type of the output.

Enumerator
ACTUAL 

These revert to the actual date from today (if the end date is left blank) or from the End Date

CALENDAR 

For pricing fields, these revert to the last business day of the specified calendar period.

FISCAL 

These periods revert to the fiscal period end for the company

Frequency of historical data.

Enumerator
DAILY 

Daily frequency

WEEKLY 

Weekly frequency

MONTHLY 

Monthly frequency

QUARTERLY 

Quarterly (3 months) frequency

SEMI_ANNUALLY 

Semi-Annual (6 months) frequency

YEARLY 

Yearly frequency

Constructor & Destructor Documentation

virtual QBbgLib::QBbgHistoricalDataRequest::~QBbgHistoricalDataRequest ( )
virtual

Destructor.

QBbgLib::QBbgHistoricalDataRequest::QBbgHistoricalDataRequest ( )

Creates an empty historical data request.

QBbgLib::QBbgHistoricalDataRequest::QBbgHistoricalDataRequest ( const QBbgHistoricalDataRequest a)

Creates a copy of another historical data request.

Member Function Documentation

virtual bool QBbgLib::QBbgHistoricalDataRequest::adjustmentAbnormal ( ) const
virtual
virtual bool QBbgLib::QBbgHistoricalDataRequest::adjustmentFollowDPDF ( ) const
virtual
virtual bool QBbgLib::QBbgHistoricalDataRequest::adjustmentNormal ( ) const
virtual
virtual bool QBbgLib::QBbgHistoricalDataRequest::adjustmentSplit ( ) const
virtual
See also
adjustmentSplit
virtual QString QBbgLib::QBbgHistoricalDataRequest::calendarCode ( ) const
virtual
See also
calendarCode
virtual QString QBbgLib::QBbgHistoricalDataRequest::currency ( ) const
virtual
See also
currency
virtual const QDate& QBbgLib::QBbgHistoricalDataRequest::endDate ( ) const
virtual

The last date of the period to retrieve data.

virtual bool QBbgLib::QBbgHistoricalDataRequest::fillWithNull ( ) const
virtual
See also
fillWithNull
virtual bool QBbgLib::QBbgHistoricalDataRequest::isValidReq ( ) const
virtual
virtual qint32 QBbgLib::QBbgHistoricalDataRequest::maxDataPoints ( ) const
virtual
See also
maxDataPoints
virtual NonTradingDayFill QBbgLib::QBbgHistoricalDataRequest::nonTradingDayFill ( ) const
virtual
virtual QBbgHistoricalDataRequest& QBbgLib::QBbgHistoricalDataRequest::operator= ( const QBbgHistoricalDataRequest a)
virtual

Copies another historical data request.

virtual bool QBbgLib::QBbgHistoricalDataRequest::operator== ( const QBbgHistoricalDataRequest a) const
virtual

Checks if two requests are identical.

virtual PeriodAdjustment QBbgLib::QBbgHistoricalDataRequest::periodicityAdjustment ( ) const
virtual
virtual PeriodSelection QBbgLib::QBbgHistoricalDataRequest::periodicitySelection ( ) const
virtual
virtual void QBbgLib::QBbgHistoricalDataRequest::setAdjustmentAbnormal ( bool  val)
virtual
virtual void QBbgLib::QBbgHistoricalDataRequest::setAdjustmentFollowDPDF ( bool  val)
virtual
virtual void QBbgLib::QBbgHistoricalDataRequest::setAdjustmentNormal ( bool  val)
virtual
virtual void QBbgLib::QBbgHistoricalDataRequest::setAdjustmentSplit ( bool  val)
virtual
See also
adjustmentSplit
virtual void QBbgLib::QBbgHistoricalDataRequest::setCalendarCode ( QString  val)
virtual
See also
calendarCode
virtual void QBbgLib::QBbgHistoricalDataRequest::setCurrency ( QString  val)
virtual
See also
currency
virtual void QBbgLib::QBbgHistoricalDataRequest::setEndDate ( const QDate &  val)
virtual

Set the last date of the period to retrieve data.

virtual void QBbgLib::QBbgHistoricalDataRequest::setFillWithNull ( bool  val)
virtual
See also
fillWithNull
virtual void QBbgLib::QBbgHistoricalDataRequest::setMaxDataPoints ( qint32  val)
virtual
See also
maxDataPoints
virtual void QBbgLib::QBbgHistoricalDataRequest::setNonTradingDayFill ( NonTradingDayFill  val)
virtual
virtual void QBbgLib::QBbgHistoricalDataRequest::setPeriodicityAdjustment ( PeriodAdjustment  val)
virtual
virtual void QBbgLib::QBbgHistoricalDataRequest::setPeriodicitySelection ( QBbgHistoricalDataRequest::PeriodSelection  val)
virtual
virtual void QBbgLib::QBbgHistoricalDataRequest::setSecurity ( const QBbgSecurity val)
virtual

Reimplemented from QBbgAbstractRequest::setSecurity()

Reimplemented from QBbgLib::QBbgAbstractRequest.

virtual void QBbgLib::QBbgHistoricalDataRequest::setStartDate ( const QDate &  val)
virtual

Set the first date of the period to retrieve data.

virtual void QBbgLib::QBbgHistoricalDataRequest::setUseClosePrice ( bool  val)
virtual
See also
useClosePrice
virtual void QBbgLib::QBbgHistoricalDataRequest::setUsePriceForPricing ( bool  val)
virtual
virtual void QBbgLib::QBbgHistoricalDataRequest::setUseRelativeDate ( bool  val)
virtual
See also
useRelativeDate
virtual const QDate& QBbgLib::QBbgHistoricalDataRequest::startDate ( ) const
virtual

The first date of the period to retrieve data.

virtual bool QBbgLib::QBbgHistoricalDataRequest::useClosePrice ( ) const
virtual
See also
useClosePrice
virtual bool QBbgLib::QBbgHistoricalDataRequest::usePriceForPricing ( ) const
virtual
virtual bool QBbgLib::QBbgHistoricalDataRequest::useRelativeDate ( ) const
virtual
See also
useRelativeDate

Property Documentation

bool QBbgLib::QBbgHistoricalDataRequest::adjustmentAbnormal
readwrite

Adjusts for Abnormal Cash Dividends.

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
Read
adjustmentAbnormal()
Write
setAdjustmentAbnormal()
bool QBbgLib::QBbgHistoricalDataRequest::adjustmentFollowDPDF
readwrite

Adjustments based on DPDF.

Setting to true will follow the DPDF<GO> Bloomberg function.
True is the default setting for this option.

Read
adjustmentFollowDPDF()
Write
setAdjustmentFollowDPDF()
bool QBbgLib::QBbgHistoricalDataRequest::adjustmentNormal
readwrite

Adjust for "change on day".

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
Read
adjustmentNormal()
Write
setAdjustmentNormal()
bool QBbgLib::QBbgHistoricalDataRequest::adjustmentSplit
readwrite

Adjustments based on Capital Changes.

Adjust historical pricing and/or volume to reflect: Spin-Offs, Stock Splits/Consolidations, Stock Dividend/Bonus, Rights Offerings/Entitlement.

Read
adjustmentSplit()
Write
setAdjustmentSplit()
QString QBbgLib::QBbgHistoricalDataRequest::calendarCode
readwrite

Returns the data based on the calendar of the specified country, exchange, or religion.

Returns the data based on the calendar of the specified country, exchange, or religion from CDR<GO>.
Taking a two character calendar code null terminated string. This will cause the data to be aligned according to the calendar and including calendar holidays.
Only applies only to DAILY requests.

Read
calendarCode()
Write
setCalendarCode()
QString QBbgLib::QBbgHistoricalDataRequest::currency
readwrite

Amends the value from local to desired currency.

Use the 3 letters ISO code for the currency

Read
currency()
Write
setCurrency()
QDate QBbgLib::QBbgHistoricalDataRequest::endDate
readwrite

The end date of the period to retrieve data.

bool QBbgLib::QBbgHistoricalDataRequest::fillWithNull
readwrite

If data is to be displayed for non trading days what is the data to be returned.

If set to true it will return a null QVariant for the non trading days otherwise the previous value will be used

Read
fillWithNull()
Write
setFillWithNull()
qint32 QBbgLib::QBbgHistoricalDataRequest::maxDataPoints
readwrite

Maximum number of data points to return.

The response will contain up to X data points, where X is the integer specified.
If the original data set is larger than X, the response will be a subset, containing the last X data points.
Hence the first range of data points will be removed.

Read
maxDataPoints()
Write
setMaxDataPoints()
NonTradingDayFill QBbgLib::QBbgHistoricalDataRequest::nonTradingDayFill
readwrite

Sets to include/exclude non trading days where no data was generated.

Read
nonTradingDayFill()
Write
setNonTradingDayFill()
PeriodAdjustment QBbgLib::QBbgHistoricalDataRequest::periodicityAdjustment
readwrite

Determine the frequency and calendar type of the output. To be used in conjunction with periodicitySelection.

Read
periodicityAdjustment()
Write
setPeriodicityAdjustment()
PeriodSelection QBbgLib::QBbgHistoricalDataRequest::periodicitySelection
readwrite

Determine the frequency of the output. To be used in conjunction with periodicityAdjustment.

Read
periodicitySelection()
Write
setPeriodicitySelection()
QDate QBbgLib::QBbgHistoricalDataRequest::startDate
readwrite

The first date of the period to retrieve data.

bool QBbgLib::QBbgHistoricalDataRequest::useClosePrice
readwrite

Indicates whether to use the average or the closing price in quote calculation.

Read
useClosePrice()
Write
setUseClosePrice()
bool QBbgLib::QBbgHistoricalDataRequest::usePriceForPricing
readwrite

Sets quote to Price or Yield for a debt instrument whose default value is quoted in yield.

true = Price, false = yield

Read
usePriceForPricing()
Write
setUsePriceForPricing()
bool QBbgLib::QBbgHistoricalDataRequest::useRelativeDate
readwrite

Returns data with a relative date.

Read
useRelativeDate()
Write
setUseRelativeDate()

The documentation for this class was generated from the following file: