金融ITコンサルティング ~ 受託開発

クオンツエンジニアリングサービス

金融パッケージソフト開発&販売

金融機関の現場に常駐している金融業務知識の豊富なエンジニア部隊が、プライシングシートの制作や計算エンジンの開発等を行います。

 

金融機関のトレーディングルーム等の現場に常駐している専門性の高いエンジニア部隊が、ユーザーのニーズを聞き出しながらプライシングシートの制作や計算エンジンの開発等をスパイラル的に行うサービスです。

金融に関する知識が豊富で、金融機関のクオンツアナリストの業務を理解した者にしかできないことから、「クオンツエンジニア」と名付けました。

エフのクオンツエンジニアは、金融機関のクオンツアナリストの方々が構築した金融工学モデルを理解した上で、実際の業務で効率よく使用できるように開発し、ご提供します。

 

 

 

以下に、エフのクオンツエンジニアがシステム開発時に頻繁に使用するCode SnippetとFinancial IT glossaryの一部をご紹介します。

 

■免責事項

本ページ内に掲載の情報をご利用いただいた際に生じた損害につきましては、株式会社エフはその責任を負いかねますので、あらかじめご了承ください。

Code Snippet

Financial IT glossary

リンク集

  • 【 VBA 】C# DataGridView用スタブデータ生成マクロ

    1.      ExcelのSheet1にText1を配置

    2.      ボタンイベント等に以下のコードを記述

     

        Sheet1.TextBox1.Text = ""

        Dim wkstr1 As String

        Dim wkstr2 As String

        For irow = Selection(1).Row To Selection(Selection.Count).Row

            wkstr1 = ""

            wkstr2 = ""

            If irow = Selection(1).Row Then

                For icol = Selection(1).Column To Selection(Selection.Count).Column

                    If icol = Selection(1).Column Then

                    Else

                        Sheet1.TextBox1.Text = Sheet1.TextBox1.Text & vbCrLf & "dataGridView1.Columns.Add(""Column " & CStr(icol) & """, """ & Range(Cells(irow, icol), Cells(irow, icol)).Text & """);"

                    End If

                Next

            Else

                For icol = Selection(1).Column To Selection(Selection.Count).Column

                    If icol = Selection(1).Column Then

                        wkstr1 = Range(Cells(irow, icol), Cells(irow, icol)).Text

                    Else

                        If wkstr2 <> "" Then wkstr2 = wkstr2 & ", "

                        wkstr2 = wkstr2 & """" & Range(Cells(irow, icol), Cells(irow, icol)).Text & """"

                    End If

                    If icol = Selection(Selection.Count).Column Then

                        Sheet1.TextBox1.Text = Sheet1.TextBox1.Text & vbCrLf & "dataGridView1.Rows.Add(" & wkstr2 & ");"

                        Sheet1.TextBox1.Text = Sheet1.TextBox1.Text & vbCrLf & "dataGridView1.Rows[dataGridView1.RowCount - 1].HeaderCell.Value = """ & wkstr1 & """;"

                    End If

                Next

            End If

        Next

       Sheet1.TextBox1.SelStart = 0

     

    3.      Excelの範囲を指定してボタン押下等でマクロを呼び出すと、dataGridView用のコードがText1に生成される。

     

  • 【 VBA 】入力最終行の取得

    LastRow = Cells(Rows.Count, 1).End(xlUp).Row

  • 【 VBA 】検索対象のファイルを開いて閉じる

    Public Sub Sample_RefExcelFiles_01()

          ' フォルダ参照ダイアログを利用して、フォルダを特定する。

          Dim folderName As Variant

          Set folderName = CreateObject("Shell.Application").BrowseForFolder(&O0, "フォルダ選択", &H1 + &H10, "デスクトップ")

          ' フォルダが選択されたか否か判別する。

          If folderName Is Nothing Then

              MsgBox "中止します"

              Exit Sub

          End If

          ' 単純なループカウンタ

          Dim lp1 As Long, lp2 As Long

          ' FileSystemObjectを作成する。

          Dim Obj As Object

          Set Obj = CreateObject("Scripting.FilesystemObject")

          ' 選択されたフォルダ配下に存在するファイル名を取出す為の変数

          Dim fileName As String

          Dim fileNames() As String

          ReDim fileNames(0) As String

          ' 選択されたフォルダ配下に存在するファイル名を取出す

          fileName = Dir(folderName.Self.path & "\*.xls")

          Do While fileName <> vbNullString

              ' ファイル名を配列に取込む。

              ReDim Preserve fileNames(UBound(fileNames) + 1) As String

              fileNames(UBound(fileNames)) = folderName.Self.path & "\" & fileName

              fileName = Dir()

          Loop

          ' 全てのExcelファイルを順次開いて閉じる。

          For lp1 = 1 To UBound(fileNames)

              ' Excelファイルを読み取り専用で開く。

              Workbooks.Open fileName:=fileNames(lp1), ReadOnly:=True

              ' 開いたファイルのブック名を取得する。

              Dim bookName As String

              bookName = Obj.GetFileName(fileNames(lp1))

              ' 開いたファイルの全シートを全て参照する。

              For lp2 = 1 To Workbooks(bookName).Sheets.Count

                  ' ***************

                  ' 集計処理を行う

                  ' ***************

              Next

              ' 開いていたExcelファイルを保存せずに閉じる。

              Workbooks(bookName).Close SaveChanges:=False

          Next

  • 【 VBA 】ファイルを開く時のリンクの更新

    'リンクを更新しないで開く

    Workbooks.Open FileName:="C:\Book1.xls", UpdateLinks:=0

    'リンクを更新して開く

    Workbooks.Open FileName:="C:\Book1.xls", UpdateLinks:=3

  • 【 VBA 】ダイアログ表示の抑止

    Application.DisplayAlerts = False

  • 【 C# 】IsNumeric関数

    public static bool IsNumeric(string stTarget)

    {

    double dNullable;

    return double.TryParse(stTarget, System.Globalization.NumberStyles.Any,    null, out dNullable);

    }

  • 【 C# 】Link to XML読み込み

    var xelm = XElement.Load(@"XMLMasterFiles\RatesDefinition.xml");

    var indexs = (

    from p in xelm.Elements("IndexRIC")

    select p);

     

    foreach (var index in indexs)

    {

    string val = index.Element("IndexName").Value;

    }

  • 【 Financial 】Abbreviated Word

    Discount Factor

    CashFlow

    End of Month

    Floating Rate Note

    Forward Rate Agreement

    Implied Forward Rate

    International Monetary Market

    Net Present Value

    OverNight

    Per Annum

    Per Quarter

    Present Value

    Semi Annual

    SpotNext

    TomorrowNext

    Zero Rate/Zero Coupon Rate

    DF

    CF

    EoM

    FRN

    FRA

    IFR

    IMM

    NPV

    ON

    PA

    PQ

    PV

    SA

    SN

    TN

    ZERO

  • 【 Financial 】Roll Convention

     

    Description

    The date will be the first following day that is a Business Day.

    The date will be the first following day that is a Business Day.

    unless that day falls in the next calendar month,

    In which case that date will be the first Preceding Day that is a Business Day.

    Value

    Following

    Modified Following

    That date will be the first preceding day that is Business Day.

    Preceding

    Payment Dates or Period End Dates will be each day during the Term of the Transaction that numerically corresponds to the preceding applicable Payment Date or Period End Date

    , as the case may be, “Date” in the calendar month that is specified number of months after the month in which the preceding applicable Payment Date or Period End Date occurred.

     

    Except

    If there is not any such numerical corresponding day in the calendar, and then it will be the last day that is a Business Day in that month.

    If a Date of the party would otherwise fall on a day that is not a Business Day, then the Date will be the first following day that is a Business Day unless that day falls in the next calendar month, in which case the Date will be the first preceding day that is a Business Day.

    If the preceding applicable Date of that party occurred on the last day in a calendar month that was a Business Day, then all subsequent applicable Date of that party prior to the Termination Date will be thae last day that is Business Day in the month that is the specified number of months after the month in which the preceding applicable Date occurred.

    FRN Convention

    Eurodollar Convention

  • 【 Financial 】Date Definition

    ・Banking Day

      It means, in respect of any city, and day on which commercial banks are open for general business in that city.

     

    ・Business Day

     It means, in respect of any date that is specified in a Confirmation to be subject to adjustment in accordance with any applicable Business Day Convention, a day on which commercial banks and foreign exchange markets settle payments and are open for general business.

     

    ・Term

     It means the period commencing on the Effective Date of a Transaction and ending on the Termination Date of the Transaction.

     

    ・Effective Date

     It means the date specified as such in the related Confirmation, which date is the first day of the Term of the Transaction. The Effective Date shall not be subject to adjustment in accordance with any Business Day Convention unless the parties specify it will be adjusted with a specified Business Day Convention.

     

    ・Termination Date

     It means the date specified as such in the related Confirmation, which date is the last day of the Term of the Transaction. The Effective Date shall not be subject to adjustment in accordance with any Business Day Convention unless the parties specify it will be adjusted with a specified Business Day Convention.

     

    ・Initial Exchange Date

     If the date is not so specified and an Initial Exchange Amount is specified in the related Confirmation, it is same date as Effective Date but Initial Exchange Date shall be subject to adjustment in accordance with the Following Business Day Convention unless otherwise specified in the related Confirmation.

     

    ・Interim Exchange Date

    ・Periodic Exchange Date

     “Interim Exchange Date” or “Periodic Exchange Date” shall be subject to adjustment in accordance with the Modified Following Business Day Convention unless otherwise specified in the related Confirmation.

     

    ・Final  Exchange Date

    ・Exchange Date

    ・Maturity Date

     “Final Exchange Date” or “Exchange Date” or “Maturity Date” are not so specified and a Final Exchange Amount is specified in the related Confirmation, it is same date as Termination Date but Final Exchange Date shall be subject to adjustment in accordance with the Modified Following Business Day Convention unless otherwise specified in the related Confirmation.

     

    ・Trade Date

     It means the date on which the parties enter into the Transaction.

     

    ・Notional Amount

    ・Fixed Amount

    ・Floating Amount

    ・Currency Amount

     

    ・Business Day Conventions

    ・Business Days

  • 【 Financial 】Day Count Convention

    ・30/360 US

    ・Bond basis

    ・360/360

    If the investment is EOM and (Date1 is the last day of February) and (Date2 is the last day of February), then change D2 to 30.

    If the investment is EOM and (Date1 is the last day of February), then change D1 to 30.

    If D2 is 31 and D1 is 30 or 31, then change D2 to 30.

    If D1 is 31, then change D1 to 30.

     

    ・30E/360

    ・30/360 ICMA

    ・Eurobond basis(ISDA 2006)

    ・Special German

    If D1 is 31, then change D1 to 30.

    If D2 is 31, then change D2 to 30.

     

    ・30E/360 ISDA

    ・Eurobond basis (ISDA 2000)

    ・German

    If D1 is the last day of the month, then change D1 to 30.

    If D2 is the last day of the month (unless Date2 is the maturity date and M2 is February), then change D2 to 30.

     

    ・30E+/360

    If D1 is 31, then change D1 to 30.

    If D2 is 31, then increment M2 and change D2 to 1.

     

    ・Actual/Actual ICMA

    ・Actual/Actual

    ・Act/Act ICMA

    ・ISMA-99

    ・Act/Act ISMA

     

     

     

     

     

     

    Days(StartDate, EndDate) calculate the number of days between two dates (e.g., between Date1 and Date2) as the Julian difference.

    This is the convention used for US Treasury bonds and notes, among other securities.

     

    ・Actual/Actual ISDA

    ・Actual/Actual

    ・Act/Act

    ・Actual/365

    ・Act/365

     

     

     

    Days(StartDate, EndDate) calculate the number of days between two dates (e.g., between Date1 and Date2) as the Julian difference.

     

    ・Actual/365 Fixed

    ・Act/365 Fixed

    ・A/365 Fixed

    ・A/365F

    ・English

     

     

     

    Days(StartDate, EndDate) calculate the number of days between two dates (e.g., between Date1 and Date2) as the Julian difference.

     

    ・Actual/360

    ・Act/360

    ・A/360

    ・French

     

     

     

    Days(StartDate, EndDate) calculate the number of days between two dates (e.g., between Date1 and Date2) as the Julian difference.

    This convention is used in money markets for short-term lending of currencies, including the US dollar and Euro

     

    ・Actual/364

     

     

     

     

    Days(StartDate, EndDate) calculate the number of days between two dates (e.g., between Date1 and Date2) as the Julian difference.

     

    ・Actual/365L

    ・ISMA-Year

    If Freq = 1 (annual coupons):

    If February 29 is in the range from Date1 (exclusive) to Date3 (inclusive), then DiY = 366, else DiY = 365.

    If Freq <> 1

    If Date3 is in a leap year, then DiY = 366, else DiY = 365.

     

     

     

  • 【 Financial 】Government Bond

    Modified Following

    The date will be the first following day that is a Business Day.

    unless that day falls in the next calendar month,

    In which case that date will be the first Preceding Day that is a Business Day.

  • 【 Financial 】Greeks

     

     

    Value (V)

    Delta ( )

    Vega ( )

    Spot Price (S)

        Delta

        Gamma

    Vanna

    Volatolity (  )

        Vrga

    Vanna ( Vomma )

    Volga

    Timeto Expiry (  )

        Theta

    The Greeks of vanilla options (calls and puts) under the Black–Scholes model

    For a given:

         Stock Price  , Strike Price  , Risk-Free Rate  , Annual Dividend Yield  , Time to Maturity,

           , and Volatility  ,

           (phi) is the standard normal probability density function,   is the standard normal cumulative distribution function

    Calls

    Puts

    value

    delta

    vega

    theta

    gamma

    vanna

    Volga

  • 【 Financial 】List of Futures Exchanges

    ・USA

     Chicago Mercantile Exchange (CME) (Since 2007 a Designated Contract Market owned by the CME Group)

     Chicago Board of Trade (CBOT) (Since 2007 a Designated Contract Market owned by the CME Group)

     New York Mercantile Exchange (NYMEX) and (COMEX) (Since 2008 Designated Contract Markets owned by the CME Group)

     

    ・United Kingdom

     London International Financial Futures and Options Exchange (LIFFE), precursor to Euronext.liffe

     

    ・China

     Shanghai Futures Exchange (SHFE)

     China Financial Futures Exchange (CFFEX)

     

    ・Hong Kong

     Hong Kong Exchanges and Clearing (HKEx)

     

    ・Japan

     Osaka Securities Exchange (OSE)

     Tokyo Commodity Exchange (TOCOM)

     Tokyo Stock Exchange (TSE)

     Tokyo Financial Exchange (TFX)

     

    ・Singapore

     Singapore Exchange (SGX)

     Singapore Mercantile Exchange (SMX)

  • 【 Financial 】List of stock exchanges

    Stock Exchange

    Economy

    Head­quarters

    Time Zone

    Δ

    DST

    Open

    (local)

    Close

    (local)

    Lunch

    (local)

    Open

    (UTC)

    Close

    (UTC)

    NYSE Euronext

    EST

    −5

    Mar–Nov

    09:30

    16:00

    No

    14:30

    21:00

    New York City

     

    United States /

     

    European Union

    Tokyo Stock

    Exchange

    JST

    +9

    09:00

    15:00

    11:30-

    12:30

    00:00

    06:00

    Tokyo

     

    Japan

    NASDAQ OMX

    Group

    No

    14:30

     

    United States /

     

    European Union

    New York City

    EST

    −5

    Mar–Nov

    09:30

    16:00

    21:00

    London Stock

    Exchange

    No

    08:00

     

    United Kingdom

    London

    GMT

    +0

    Mar–Oct

    08:00

    16:30

    16:30

    Hong Kong Stock

    Exchange

    12:00-

    13:00

    01:15

     

    Hong Kong

    Hong Kong

    HKT

    +8

    09:15

    16:00

    08:00

    Shanghai Stock

    Exchange

    11:30-

    13:00

    01:30

     

    China

    Shanghai

    CST

    +8

    09:30

    15:00

    07:00

    TMX Group

    No

    14:30

     

    Canada

    Toronto

    EST

    -5

    Mar–Nov

    09:30

    16:00

    21:00

    Deutsche Börse

    No

    07:00

     

    Germany

    Frankfurt

    CET

    +1

    Mar–Oct

    08:00

     (Eurex)

    8:00

     (floor)

    9:00

     (Xetra)

    22:00

     (Eurex)

    20:00

     (floor)

    17:30

     (Xetra)

     

    21:00

    Australian

    Securities

    Exchange

    No

    23:50

     

    Australia

    Sydney

    AEST

    +10

    Oct–Apr

    09:50

    16:12

    06:12

    Bombay Stock

    Exchange

    No

    03:45

     

    India

    Mumbai

    IST

    +5.5

    09:15

    15:30

    10:00

    National Stock

    Exchange of India

    No

    03:45

     

    India

    Mumbai

    IST

    +5.5

    09:15

    15:30

    10:00

    SIX Swiss

    Exchange

     

    Switzerland

    Zurich

    BM&F Bovespa

    No

    13:00

     

    Brazil

    São Paulo

    BRST

    -3

    Oct–Feb

    10:00

    17:30

    20:00

    Korea Exchange

    No

    00:00

     

    South Korea

    Seoul

    KST

    +9

    09:00

    15:00

    06:00

    Shenzhen Stock

    Exchange

    11:30-

    13:00

    01:30

     

    China

    Shenzhen

    CST

    +8

    09:30

    15:00

    07:00

    BME Spanish

    Exchanges

    No

    08:00

     

    Spain

    Madrid

    CET

    +1

    Mar–Oct

    09:00

    17:30

    16:30

    JSE Limited

    No

    07:00

     

    South Africa

    Johannesburg

    CAT

    +2

    09:00

    17:00

    15:00

    Moscow Exchange

    No

    06:00

     

    Russia

    Moscow

    MSK

    +4

    10:00

    18:45

    14:45

    Singapore

    Exchange

    No

    01:00

     

    Singapore

     

     

    Singapore

    SGT

    +8

    09:00

    17:00

    09:00

    Taiwan Stock

    Exchange

    No

    01:00

     

    Taiwan

     

    Taipei

    CST

    +8

    09:00

    13:30

    05:30

  • 【 Financial 】Futures maturity codes

    F - January

    G - February

    H - March

    J - April

    K - May

    M - June

    N - July

    Q - August

    U - September

    V - October

    X - November

    Z - December

  • 【 Financial 】O/N, T/N, S/N, SPOT

    S/NとSPOTを混同している方をたまに見かけるので、記載してみました。

     

    【ON、TNとSNとは?】

     それぞれ1日間の適応金利になる為、Today基準の計算(DF、ZEROやTrade)の際には、Lag(Days)が「0」または「1」の場合にはO/

     Nが必要。Lag(Days)が「2」の場合、O/NとT/Nが必要。となる。

    約定日

    1営業日目

    2営業日目

    3営業日目

    ( T + 0 )

    ( T + 1 )

    ( T + 2 )

    ( T + 3 )

    O / N

    start

    end

    T / N

    start

    end

    S / N

    start

    end

    Yieldカーブの計算の性質上、Spot日(T+2)の誤差は最後まで影響を及ぼす為、注意が必要。

    【Today基準とSettle基準とは?】

     DF(t1,t2)が対象としている期間

     通常Swap Rateは、Settle(T+2)基準でQuoteが、Today(T+0)基準で計算される事が多いので、変換が必要。

     

     DF(O/N) × DF(T/N) = DF(Today,Settle)

     DF(Today,Settle) × DF(Sette,T) = DF(Today,T)

    ・・・・・

    T

    Settle

    Today

    ( T + 0 )

    ( T + 1 )

    ( T + 2 )

    ( T + 3 )

    DF ( O / N )

    DF ( T / N )

    DF ( Today , Settle )

    DF ( Settle,T )

    DF ( Today,T )

     

    end

    「DF(t1,t2) ×DF(t2,t3) = DF(t1,t3)」が成り立つ事を前提とした計算式が金融では多数存在する。

    ※現実のマーケットは成り立たない事が多いですが・・・。

  • 【 IT 】アクセス修飾子

    宣言されたアクセシビリティ

    説  明

    アクセスの制限はありません。

    アクセスは現在のアセンブリに制限されます。

    public

    protected

    internal

    protected  internal

    private

    アクセスは、コンテナー クラス、またはコンテナー クラスから派生した型に制限されます。

    現在のアセンブリ、またはコンテナー クラスから派生した型に制限されるアクセス

    アクセスはコンテナー型に制限されます。

クオンツエンジニアリングサービス

株式会社エフ情報セキュリティ基本方針サイトポリシーサイトマップ

Copyright © Eff Limited All Rights Reserved.