Module: Tushare::Datayes::Bond

Included in:
Tushare::Datayes
Defined in:
lib/tushare/datayes/bond.rb

Overview

通联数据-债券信息

Instance Method Summary collapse

Instance Method Details

#bond(sec_id: '', ticker: '', field: '') ⇒ Object

债券的基本面信息,涵盖了债券计息方式、付息频率、起息日、到期日、兑付形式等。



6
7
8
# File 'lib/tushare/datayes/bond.rb', line 6

def bond(sec_id: '', ticker: '', field: '')
  fetch_data format(BOND, sec_id, ticker, field)
end

#bond_cf(sec_id: '', ticker: '', begin_date: '', cash_type_cd: '', end_date: '', field: '') ⇒ Object

债券在每个计息周期付息兑付的相关数据。日期区间默认为过去一年。



11
12
13
14
15
16
# File 'lib/tushare/datayes/bond.rb', line 11

def bond_cf(sec_id: '', ticker: '', begin_date: '', cash_type_cd: '',
            end_date: '', field: '')
  api_path = format(BONDCF, sec_id, ticker, begin_date, cash_type_cd,
                    end_date, field)
  fetch_data api_path
end

#bond_coupon(sec_id: '', ticker: '', field: '') ⇒ Object

固定利率债券、浮动利率债券每个计息周期的票面利率,包括分段计息的具体利率。



19
20
21
# File 'lib/tushare/datayes/bond.rb', line 19

def bond_coupon(sec_id: '', ticker: '', field: '')
  fetch_data format(BONDCOUPON, sec_id, ticker, field)
end

#bond_guar(sec_id: '', ticker: '', guar_mode_cd: '', field: '') ⇒ Object

收录债券担保信息,如担保人、担保类型、担保方式、担保期限等。



24
25
26
# File 'lib/tushare/datayes/bond.rb', line 24

def bond_guar(sec_id: '', ticker: '', guar_mode_cd: '', field: '')
  fetch_data format(BONDGUAR, sec_id, ticker, guar_mode_cd, field)
end

#bond_issue(sec_id: '', ticker: '', raise_mode_cd: '', field: '') ⇒ Object

债券在一级市场发行信息,记录的要素包括有发行方式、发行价格、当次发行规模等



29
30
31
# File 'lib/tushare/datayes/bond.rb', line 29

def bond_issue(sec_id: '', ticker: '', raise_mode_cd: '', field: '')
  fetch_data format(BONDISSUE, sec_id, ticker, raise_mode_cd, field)
end

#bond_option(sec_id: '', ticker: '', field: '') ⇒ Object

记录债券在发行时约定在存续期内投资人或发行人可行使的选择权,如债券回售、债券赎回等。



34
35
36
# File 'lib/tushare/datayes/bond.rb', line 34

def bond_option(sec_id: '', ticker: '', field: '')
  fetch_data format(BONDOPTION, sec_id, ticker, field)
end

#bond_rating(sec_id: '', ticker: '', begin_date: '', end_date: '', field: '') ⇒ Object

债券的长期评级、短期评级以及历史评级变动记录。



39
40
41
42
43
44
# File 'lib/tushare/datayes/bond.rb', line 39

def bond_rating(sec_id: '', ticker: '', begin_date: '', end_date: '',
                field: '')
  api_path = format(BONDRATING, sec_id, ticker, begin_date, end_date,
                    field)
  fetch_data api_path
end

#guar_rating(sec_id: '', ticker: '', begin_date: '', end_date: '', field: '') ⇒ Object

各评级机构公布的债券担保人的信用评级数据及历史变动记录。



47
48
49
50
51
52
# File 'lib/tushare/datayes/bond.rb', line 47

def guar_rating(sec_id: '', ticker: '', begin_date: '', end_date: '',
                field: '')
  api_path = format(GUARRATING, sec_id, ticker, begin_date, end_date,
                    field)
  fetch_data api_path
end

#issuer_rating(sec_id: '', ticker: '', begin_date: '', end_date: '', field: '') ⇒ Object

各评级机构公布的债券发行人的信用评级数据及历史变动记录。



55
56
57
58
59
60
# File 'lib/tushare/datayes/bond.rb', line 55

def issuer_rating(sec_id: '', ticker: '', begin_date: '', end_date: '',
                  field: '')
  api_path = format(ISSUERRATING, sec_id, ticker, begin_date, end_date,
                    field)
  fetch_data api_path
end

#repo(sec_id: '', ticker: '', field: '') ⇒ Object

债券回购基本面信息,涵盖了回购交易代码、回购期限、申报价格最小变动单位(RMB)、申报参与价格单位(RMB)等。



64
65
66
# File 'lib/tushare/datayes/bond.rb', line 64

def repo(sec_id: '', ticker: '', field: '')
  fetch_data format(REPO, sec_id, ticker, field)
end