From 4477064cbd8a40e8f738bfa0fc14c80c1fe82365 Mon Sep 17 00:00:00 2001 From: JHM Darbyshire <24256554+attack68@users.noreply.github.com> Date: Sun, 2 Feb 2025 12:44:35 +0100 Subject: [PATCH] DOCS: update 1.7.x (#673) Co-authored-by: JHM Darbyshire (M1) --- LICENSE | 95 +++++++++-- docs/source/_static/badges.json | 2 +- docs/source/_static/css/overwrites.css | 44 ++++- .../_static/rateslib_excel_logo_small.png | Bin 0 -> 3255 bytes .../source/_static/rateslib_js_logo_small.png | Bin 0 -> 9711 bytes .../source/_static/rateslib_rs_logo_small.png | Bin 0 -> 3645 bytes docs/source/conf.py | 2 +- docs/source/e_combinations.rst | 2 +- docs/source/g_coverage.rst | 104 +++++++----- docs/source/i_about.rst | 27 ++- docs/source/i_guide.rst | 22 +++ docs/source/i_licence.rst | 159 +++++++++++++----- docs/source/i_purchase.rst | 30 ++++ docs/source/index.rst | 104 ++++-------- docs/source/z_curve_from_zero_rates.ipynb | 10 +- pyproject.toml | 1 + 16 files changed, 415 insertions(+), 187 deletions(-) create mode 100644 docs/source/_static/rateslib_excel_logo_small.png create mode 100644 docs/source/_static/rateslib_js_logo_small.png create mode 100644 docs/source/_static/rateslib_rs_logo_small.png create mode 100644 docs/source/i_purchase.rst diff --git a/LICENSE b/LICENSE index 9badf7abf..17c1c323d 100644 --- a/LICENSE +++ b/LICENSE @@ -2,6 +2,9 @@ Attribution-NonCommercial-NoDerivatives 4.0 International ======================================================================= +This an an amended Creative Commons Attribution-NonCommercial-NoDerivatives +4.0 International licence. + Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or @@ -54,11 +57,11 @@ exhaustive, and do not form part of our licenses. ======================================================================= -Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 +Amended Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons +to be bound by the terms and conditions of this Amended Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in @@ -102,6 +105,9 @@ Section 1 -- Definitions. or other material to which the Licensor applied this Public License. + All of Rateslib's codebases, documentation, and other training + materials falls under Licensed Material. + f. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the @@ -110,15 +116,38 @@ Section 1 -- Definitions. g. Licensor means the individual(s) or entity(ies) granting rights under this Public License. + The Licensor for Rateslib is Siffrorna Technology Limited. + h. NonCommercial means not primarily intended for or directed towards - commercial advantage or monetary compensation. For purposes of - this Public License, the exchange of the Licensed Material for - other material subject to Copyright and Similar Rights by digital - file-sharing or similar means is NonCommercial provided there is - no payment of monetary compensation in connection with the - exchange. - - i. Share means to provide material to the public by any means or + commercial advantage or monetary compensation. NonCommercial cannot + also be any of the activities defined as Commercial. + + i. Commercial means use intended for or directed towards commercial + advantage or monetary compensation. + + In the context of Rateslib the definition of Commercial includes: + + - Code execution on any physical operating system or virtual + environment owned by a commercial entity. + - Installation on any operating system owned by a commercial entity via + methods such as; direct code transfer from source, installation via PyPI, + installation via Conda. + - Installation in a virtual environment from a machine + owned by a commercial entity, such as in a WebBrowser via PyOdide or + in a BQuant environment via a Bloomberg Terminal. + - Including Rateslib code directly, or as a software dependency, in the + creation of another software product, used either internally by that + creating commercial entity or for transmission or resale to + associates or customers of the creating commercial entity. + + j. First-hand Commercial Use means any Commercial activity used only + internally and exclusively by You. + + k. Second-hand Commercial Use means packaging, distributing and + re-selling any of the functions defined as Commercial to any + third-party. + + l. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material @@ -126,15 +155,33 @@ Section 1 -- Definitions. public may access the material from a place and at a time individually chosen by them. - j. Sui Generis Database Rights means rights other than copyright + m. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. - k. You means the individual or entity exercising the Licensed Rights + n. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. + o. User is a person or a device that executes Rateslib source code. + A single user constitutes: + + - A person that installs Rateslib on any of their operating systems + or virtual machines and executes its source code non-synchronously. + - A person that connects to a server (local or cloud based) and + executes Rateslib source code remotely accessing the results from + the request. + - A server that installs Rateslib and executes its source code for + any reason, e.g. to perform scheduled daily tasks, generate results, + or respond to queries from incoming API requests. + - A person that regularly uses and consumes streaming results + generated from Rateslib source code on a remote server. + + For the avoidance of doubt a recipient of an isolated report which + has been produced in whole, or in part, by Rateslib is not a User. However, + the producer of that report is a User. + Section 2 -- Scope. @@ -380,6 +427,30 @@ Section 8 -- Interpretation. that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. +Section 9 -- Commercial Licence Extension + + a. The Licensor may grant explicitly, or for a royalty fee, + a specific amendment to this licence which permits + Section 2.a) 1.b) for Commercial purposes as well as + NonCommercial. + + b. For the avoidance of doubt Section 2.a) 1.a) is not + amended under a Commercial Licence Extension. This provides + the distinction between First-Hand Commercial Use and + Second-Hand Commercial Use, the former being permitted + under a Commercial Licence Extension, whilst the latter + remains prohibited. + + c. Commercial Licence Extensions may be granted to an entire + commercial entity or per User. In the case a Commercial + Licence Extension is granted per User the definition of + User is as given in Section 1. + + d. Commercial Licence Extensions are granted with their own + terms of contract which often involve a negotiated fee + and a date of expiration at which point the licence reverts + back to the NonCommercial version. + ======================================================================= Creative Commons is not a party to its public diff --git a/docs/source/_static/badges.json b/docs/source/_static/badges.json index 924c90768..826f42ca5 100644 --- a/docs/source/_static/badges.json +++ b/docs/source/_static/badges.json @@ -1,5 +1,5 @@ { - "coverage": "97%", + "coverage": "94%", "licence": "CC-BY-NC-ND-4.0", "pypi": "v1.7.0", "conda": "v1.7.0", diff --git a/docs/source/_static/css/overwrites.css b/docs/source/_static/css/overwrites.css index 97451d87f..675a66de6 100644 --- a/docs/source/_static/css/overwrites.css +++ b/docs/source/_static/css/overwrites.css @@ -103,4 +103,46 @@ table.scrollwide td { background-color: #c4dfe9 !important; } -span.spamoff {display: none;} \ No newline at end of file +span.spamoff {display: none;} + +.flex-container-line { + display: flex; /* Makes this a true flex container! */ + padding: 10px; + margin: 0; + flex-direction: row; + justify-content: start; + flex-wrap: wrap; +} + +.flex-item { + border-left: 2px solid #cecece; + border-radius: 0px; + width: 190px; + text-align: left; + padding: 1.5em; + padding-right: 0em; +} + +.flex-item-right { + width: 500px; + text-align: left; + padding: 1.5em; + padding-right: 0em; +} + +.flex-item:hover { + /*background-color: rgba(255, 140, 0, 0.25);*/ + background-image: linear-gradient(to right, rgba(255, 140, 0, 0.35), rgba(255,140,0,0)); +} + +.purchase-btn { + border: 1px solid lightgrey; + border-radius: 15px; + padding: 0.4em; + margin: 0px 10px; + background: #eaebf5; +} + +.purchase-btn:hover { + border: 1px solid grey; +} diff --git a/docs/source/_static/rateslib_excel_logo_small.png b/docs/source/_static/rateslib_excel_logo_small.png new file mode 100644 index 0000000000000000000000000000000000000000..567ecc6f6756c8ff913962af92360a79a74a20ff GIT binary patch literal 3255 zcmV;o3`p~dP))5d!+wom~Ktmw8hJ-*7+|eJ<6j1Kc zf>iPALYh~qfE+wC7ao15F*kJ+=M0KKnd?dy`SE`+=MFr^e&{jqRaI8k!4+IRu2mo;)3iOp5%nuO) zGs#RSewVoI6#UaQ$dWDB$cv)>KO+p>Daz?nC&r8+32YGMFtA#b6E*S+xbCwaXhTvt zU9M4GQPmKT%IQ-i!;C@K^(3~kI-hJuQPVZD9KinK1cA+hzbZnKT#0gxJ`{>7{1_jQ z)O9^uBP~GI;~+W+JB1qQWqEwqlT)iK4xa$h0;)90RUq?7*TO)|Nobn=k2n>=l_(k? zFTvE$(XCrOi(zO-fEUrNOO%=$MjBWOY{y>pJrw-oF(9fkDZ)}jInlRH0kLXIVi-n( zf~Bbhr2s@IR(}beYjs`kSLny#6T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dk#W|nlrGxwV+0(y)Ma$@ZatmwXJNU^B-{-Gy?c@3MUVI(%y|C`2uq`MfQKC*p zfWo1Ztd|ZIkuA}GqC{OCClQ_$bz*7~-@+w)@!VBR=5yTp#3nd8j(^b#o_X~d`VtQl z4}XmtFZ=?}|LY%ESZF9G`-idj!uvc}Jh1&y=k!pQzdI7GU{yzekiR?PQ|u#!y%4<0 zRL2ZM$wxKwc{EL12{oN5CfWJH9s}!_|RMcw3Z@&>gBX;P^^dSdd_`4%fk$x(LffDTl zih)!)8S1D3N{Tu;HNla|BUr%U$s^<&8ffZV$gJ5dOioRbH%+VtjkdY-X`MTtW0uKO zeu_L6Fmq5+)GgQF^Kg4h+drEd8~6BH+6EWS@eMBS zSdciqecrIYwPSZnL(^cBsSUPjO@r;Tng{1JGz~Ucvj(lH+_M)hTJc2Jr>}ZUrJqdi zP!u~|l)#?w?LeeVR35@sq^Lwc0Nh2HqjN%;!%~~HD2K|m&-4z3giJ{x(`F%4whT=Y p`}a}KJJc})Q2XCgb<}Z+@jt|Swz6Q-`!fIl002ovPDHLkV1l8FKh*#L literal 0 HcmV?d00001 diff --git a/docs/source/_static/rateslib_js_logo_small.png b/docs/source/_static/rateslib_js_logo_small.png new file mode 100644 index 0000000000000000000000000000000000000000..7b40aefc9f6721ab7400a4eca1cfb175bbc4bfd4 GIT binary patch literal 9711 zcmVStO&>uS)ve<0AYj>5AR{$W90N^4L=L-RlQUJ&DC0@ZjPh;=*jPLSYvv5M~MFBAl0-BNIsH z15C~g000{K(ZT*WKal6<?_01!^k@7iDG<<3=fuAC~28EsPoqkpK{9G%|Vj005J}`Hw&=0RYXHq~ibpyyzHQsFW8>#s~laM4*8xut5h5 z!4#~(4xGUqyucR%VFpA%3?#rj5JCpzfE)^;7?wd9RKPme1hudO8lVxH;SjXJF*pt9 z;1XPc>u?taU>Kgl7`%oF1VP9M6Ja4bh!J9r*dopd7nzO(B4J20l7OTj>4+3jBE`sZ zqynizYLQ(?Bl0bB6giDtK>Co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%cd+C2qSJI!k1C|GCbEJng9V`6^f=7~C>O)5TP@7QYGfKPF)hes6`8%cywWQKrlpOS?p_yqU7f@P zC^w5~#W1Zpl$$}RK*q2N;pEatDMxvle}~}v?W(nTCU64b$?Hm{T7^j$ojrL@54u51r^N;A8zh@C4pO{4Whvf;Zb>*CYS{002ovPDHLkV1k5SV!HqU literal 0 HcmV?d00001 diff --git a/docs/source/_static/rateslib_rs_logo_small.png b/docs/source/_static/rateslib_rs_logo_small.png new file mode 100644 index 0000000000000000000000000000000000000000..ad16d0bd9d9a6c5b5a1d54fbe027dc5f208c55c9 GIT binary patch literal 3645 zcmV-D4#M$?P)UWR{2FDI1;%uS_1B z*JgA3$J}9OC!3v_4IaVn@0^^uGjqT1elzpC_kQ1Z?}j0SKouPGDuAH?oB+Dj1+Ibt zP!GTlmi$wPTnZ_~z@)L>JODTKp&cWD6j4)18d`}u0KiTF%K=z)=#Kzc3!p%!T`Amv z;5g33vTX3X(9LL^`U!y7!IBqrx4eXeBJiaUKBG^mH-HvdiMt(>kI8fI~-JISc?gla#$Kz;T=lKskU?0LyxNnKuwz z*HRfJ{(O4sp!$PJ*dp{+Ne@x~pWy|th?axjpBdK-Jb)#%>;*7|mil2w|rC87qCR9Oje#&H8!PW5YrM`oA5w@NnzQK=u} z1i-T_D$Sn)s~P-0cY(Yb(S*$NHqNP5a3zLTOjx2NhQEXQ#Y0k*L$>(wFW#We`X zFbU+(P0S(h79o7AaACRu*I4-EM^OXa5qqqA> zkklnR4eF6a@9$5u9{OG+#CzXvh~K+hn))9E5CX6VVsbtP)=+I;#FEt*$;><^yDSlU zDgZ0Q9BZFId#MEJqi%yZvX;?n9u2Bo^caBXKS|dl@=oD6&Z*)?NWq3&ZX0?A9Ln<; z(5b!>(dSuCWy%m8J<2rbaUn|5Mu?-cAL9FPA?n`fflF2n>XfaNmAy#L&vnJQwg%$J zDh02lkP#ICUUa+NZ^l)}c?f{@@uvPjAV2_Q=rAr3T#ECnc{SSmra(iQjAdCr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5CGsMga`@5r1}m-Hz4~E^;Ij?o-u{%AF8{Wj3!Hs!D2HtT)qVN z_{o?x?-e2*;Ruc#J27(A-~Ku`z*l3}4*!An zE&`Zs4Y`HICp6mRk(J9-ND9Q}?B+wW2YUqMkYNOm?P4tuxJj8I27t>);_KV1Ii?ok5kT29xQe#ccV)YA}$4U+o(G z*?&KsYOq)hgfXJ2soBi))eARm+{g_dUUFv0kfCU8ZACYM^TMTzPmCQq7K<1E+Er2Uk0(3BUHM&I;ZX;_ z*go-&+itB)vso|Jo;Zfl*?GOTLsLvnM9C%4YkY#~zZ5i`#V|}6A*6y4x5bvx`^ju} zPT@L)>WDgV#zUAi^TA`84#x-moH>zT&He{n#Y0c#55B2kcuC2IoUEL6kw_Q+-h1z& zv$LbtRXn6F!{Mwu5~!Z&%FaAqJY>knS$Tu%nuXqf>O={-6~G6w%d_aU@&x92WaZTi z!w@PXk-bdq`BJzspgN-F7Y#+Yvjg`ncxF+{-`{fZyFZ_6Ydkw_Z|$kM{Ra+Avu9>( zJb2(hYstvb{cF~)Eeo}TW@a11wK=3!aNjcdtqD`6t;)_H414Z?M9p{--18^67capt zVR0&u`r$zJKcyTyuonztK&HcihWc~Zx#^SVwya;b^hCX2vSsHZ(~*UaZom}jL}OzE zOr0SV+S8kU{=_p2ibjq3kI`sEv(NxA4DPt6G`P$lZg8qv*bZEnKQQDZ?EV7Gr$*5T@XPn`*VJM+pFVR(0%-Dd7=X>r=^2TR6! zwu~7+>5m!x>}YEZp-B*6GKmBC#A!3X^9M@dhY8Iarwv9ULM=_`=nTV|liP6n-P8YY z=<6@52r)P;He06IXu8zV-g4j2qte}I}o3ccfhdbUq>x-{TC P00000NkvXXu0mjfT)5s| literal 0 HcmV?d00001 diff --git a/docs/source/conf.py b/docs/source/conf.py index 78e7098ee..41bb01855 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,7 +14,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'Rateslib' -copyright = '2022, JHM Darbyshire' +copyright = '2022, 2023, 2024, 2025, Siffrorna Technology Limited' author = 'JHM Darbyshire' release = 'dev' diff --git a/docs/source/e_combinations.rst b/docs/source/e_combinations.rst index f82e69393..4af371b83 100644 --- a/docs/source/e_combinations.rst +++ b/docs/source/e_combinations.rst @@ -31,7 +31,7 @@ Utilities The :class:`~rateslib.instruments.Value` and :class:`~rateslib.instruments.VolValue` class serve as null *Instruments*, whose purpose is to directly parametrize a :ref:`Curve`, -:ref:`FXDeltaVolSmile` or :class:`~rateslib.fx_volatility.FXDeltaVolSurface via a +:ref:`FXDeltaVolSmile` or :class:`~rateslib.fx_volatility.FXDeltaVolSurface` via a :class:`~rateslib.solver.Solver`, without complicated *Instrument* construction. .. inheritance-diagram:: rateslib.instruments.Value rateslib.instruments.VolValue diff --git a/docs/source/g_coverage.rst b/docs/source/g_coverage.rst index e73a256f4..2b30d2155 100644 --- a/docs/source/g_coverage.rst +++ b/docs/source/g_coverage.rst @@ -4,50 +4,71 @@ Coverage *********** -The **test coverage** of this library is extensive. There are over 2800 unit tests +The **test coverage** of this library is extensive. There are over 2900 unit tests with the following coverage report: -**Test Coverage Report: as of commit #4b848b6b** +**Test Coverage Report: as of commit #89ea2154** .. code-block:: - Name LINES MISS % - ------------------------------------------------------------------- - \__init__.py 38 0 100% - \_spec_loader.py 61 2 97% - \calendars\__init__.py 98 0 100% - \calendars\dcfs.py 140 8 94% - \calendars\rs.py 52 2 96% - \curves\__init__.py 2 0 100% - \curves\curves.py 674 15 98% - \curves\rs.py 73 8 89% - \default.py 118 10 92% - \dual\__init__.py 105 8 92% - \dual\variable.py 125 16 87% - \fx\__init__.py 3 0 100% - \fx\fx_forwards.py 339 20 94% - \fx\fx_rates.py 139 0 100% - \fx_volatility.py 332 36 89% - \instruments\__init__.py 8 0 100% - \instruments\bonds\__init__.py 5 0 100% - \instruments\bonds\conventions\__init__.py 51 4 92% - \instruments\bonds\conventions\accrued.py 49 1 98% - \instruments\bonds\conventions\discounting.py 54 3 94% - \instruments\bonds\futures.py 185 26 86% - \instruments\bonds\securities.py 474 27 94% - \instruments\core.py 305 12 96% - \instruments\fx_volatility.py 353 14 96% - \instruments\generics.py 162 11 93% - \instruments\rates_derivatives.py 355 6 98% - \instruments\rates_multi_ccy.py 326 1 99% - \json.py 10 0 100% - \legs.py 560 0 100% - \periods.py 1176 67 94% - \scheduling.py 362 2 99% - \solver.py 704 19 97% - \splines.py 14 0 100% - ------------------------------------------------------------------- - TOTAL 7452 318 96% + Name Stmts Miss Cover Missing + -------------------------------------------------------------------------------------------- + python/rateslib/__init__.py 38 0 100% + python/rateslib/_spec_loader.py 63 54 14% 17-99 + python/rateslib/calendars/__init__.py 110 2 98% 18, 346 + python/rateslib/calendars/dcfs.py 143 10 93% 13, 41-42, 128, 196, 198, 200, 223, 242, 275 + python/rateslib/calendars/rs.py 73 14 81% 10, 161-170, 184, 188, 195, 199 + python/rateslib/curves/__init__.py 2 0 100% + python/rateslib/curves/_parsers.py 107 4 96% 12, 201, 216, 247 + python/rateslib/curves/curves.py 760 29 96% 44, 235, 447, 475, 1132, 1218, 1221, 1229-1230, 1472, 1475, 1509, 1567, 1770, 2377, 2457, 2504, 2563, 2644, 2646, 2657, 2676, 2680, 2684, 2688, 2692, 2696, 2818, 2923 + python/rateslib/curves/rs.py 76 9 88% 27, 62, 74, 85-87, 97, 101, 120 + python/rateslib/default.py 121 10 92% 294-381, 410-420 + python/rateslib/dual/__init__.py 9 0 100% + python/rateslib/dual/newton.py 95 1 99% 13 + python/rateslib/dual/quadratic.py 19 6 68% 8, 54-57, 71, 91 + python/rateslib/dual/utils.py 134 19 86% 15, 34, 43, 53, 117-120, 124-127, 162, 171, 179, 186, 323, 327, 345-348 + python/rateslib/dual/variable.py 131 18 86% 14, 69, 88, 91, 94, 97, 100, 116, 133, 156, 173, 189, 212-217 + python/rateslib/fx/__init__.py 3 0 100% + python/rateslib/fx/fx_forwards.py 367 9 98% 20, 814, 816, 830, 1027, 1036, 1045, 1135, 1137 + python/rateslib/fx/fx_rates.py 150 1 99% 28 + python/rateslib/fx_volatility.py 364 38 90% 391-402, 537-567, 733, 735, 737, 1140-1144, 1384 + python/rateslib/instruments/__init__.py 9 0 100% + python/rateslib/instruments/base.py 119 1 99% 21 + python/rateslib/instruments/bonds/__init__.py 5 0 100% + python/rateslib/instruments/bonds/conventions/__init__.py 55 5 91% 10, 201, 358-360 + python/rateslib/instruments/bonds/conventions/accrued.py 53 2 96% 11, 98 + python/rateslib/instruments/bonds/conventions/discounting.py 58 4 93% 10, 145, 227-228 + python/rateslib/instruments/bonds/futures.py 180 28 84% 19, 295, 451-508, 537, 589, 842-844, 947, 955 + python/rateslib/instruments/bonds/securities.py 567 59 90% 47, 276, 288-289, 427-433, 758, 762-768, 813, 852, 854, 860, 862-863, 925-951, 1356, 1747, 1755, 1874, 2363-2366, 2418-2420, 2645, 2655, 2676, 2737, 3001, 3009, 3138-3139 + python/rateslib/instruments/credit/__init__.py 2 0 100% + python/rateslib/instruments/credit/derivatives.py 45 2 96% 18, 112 + python/rateslib/instruments/fx_volatility/__init__.py 3 0 100% + python/rateslib/instruments/fx_volatility/strategies.py 283 16 94% 22, 73-79, 87-93, 119, 354, 1252-1254 + python/rateslib/instruments/fx_volatility/vanilla.py 151 5 97% 27-29, 267, 378-379 + python/rateslib/instruments/generics.py 180 12 93% 27, 137, 264-266, 269, 272, 275, 423, 431, 643, 665-671 + python/rateslib/instruments/rates/__init__.py 4 0 100% + python/rateslib/instruments/rates/inflation.py 100 2 98% 17, 559 + python/rateslib/instruments/rates/multi_currency.py 371 2 99% 43, 268 + python/rateslib/instruments/rates/single_currency.py 288 13 95% 33-35, 678, 703, 1565, 1567, 1569, 1571, 1692, 1701, 1744, 1822, 1848 + python/rateslib/instruments/sensitivities.py 57 3 95% 17, 144, 155 + python/rateslib/instruments/utils.py 132 23 83% 15, 136, 162, 169-182, 241-242, 283-284, 288, 302-304, 308-310 + python/rateslib/json.py 11 0 100% + python/rateslib/legs.py 669 8 99% 35, 1374, 1491, 1567, 1913, 2413, 2692, 3054 + python/rateslib/mutability/__init__.py 70 2 97% 12, 119 + python/rateslib/periods/__init__.py 7 0 100% + python/rateslib/periods/base.py 52 1 98% 14 + python/rateslib/periods/cashflow.py 97 2 98% 18, 360 + python/rateslib/periods/credit.py 122 6 95% 19, 198-200, 308, 419 + python/rateslib/periods/fx_volatility.py 463 60 87% 32, 155, 158, 220, 234, 303, 342, 458, 475, 970, 1143-1225, 1250, 1271 + python/rateslib/periods/index.py 143 7 95% 21, 112-116, 143, 172, 205, 324 + python/rateslib/periods/rates.py 445 14 97% 30, 144, 756, 763, 1197, 1339, 1418-1424, 1426-1432, 1569, 1662 + python/rateslib/periods/utils.py 116 11 91% 15, 196-197, 205, 231-234, 239, 250, 277, 282 + python/rateslib/scheduling.py 356 4 99% 27, 946, 1111, 1606 + python/rateslib/solver.py 729 23 97% 36-40, 1125, 1255, 1324, 1335, 1430, 1482, 1563, 1732, 1742, 1750, 2036, 2065-2072, 2221, 2230-2233, 2257 + python/rateslib/splines.py 25 1 96% 11 + -------------------------------------------------------------------------------------------- + TOTAL 8732 540 94% + It should be noted that test coverage is not the same as hypothesis testing and ensuring that the results of combinations of input arguments has the desired effect. This is @@ -59,11 +80,10 @@ the disclaimer is that some edge cases may well be missed. Style ***** -*Rateslib* uses `black` and `ruff` as a PEP8 compliant opinionated code styler. +*Rateslib* uses `ruff` as a PEP8 compliant opinionated code styler. ****** Typing ****** -*Rateslib* strives to ultimately be fully explicitly typed, but this -has not yet been implemented, and will form part of its phase 3 development. \ No newline at end of file +*Rateslib* is statically typed and uses `mypy` as a type checker. \ No newline at end of file diff --git a/docs/source/i_about.rst b/docs/source/i_about.rst index 27ec864cb..5d3025206 100644 --- a/docs/source/i_about.rst +++ b/docs/source/i_about.rst @@ -14,15 +14,24 @@ The History and Context of Rateslib *Rateslib beta* was first released in April 2023 and *rateslib v1.0* in Feb 2024. -The foundation of *rateslib* is really the code library -`Book IRDS3 `_, which laid down -basic principles and was a sandbox code environment for the -publication `Pricing and Trading Interest Rate Derivatives: A Practical Guide to Swaps `_. -Some of the code and algorithms also date back to the author's -time trading IRSs as a market-maker between 2006 and 2017. The algorithms and mathematical -code developments of *rateslib* -are all characterised and explained in -`Coding Interest Rates: FX, Swaps and Bonds `_. +The foundation of *rateslib* comes from two parts: + +- The code library introduced in `Book IRDS3 `_, which laid down + basic principles and was a sandbox code environment for the + publication `Pricing and Trading Interest Rate Derivatives: A Practical Guide to Swaps `_. + This code prioritised a pedagogical style with an API as simple and intuitive as possible, with + the aim of communicating relevant aspects of fixed income to those even with limited coding experience. +- Code and algorithms dating back to the author's + time trading IRSs as a market-maker between 2006 and 2017. + This code prioritised accuracy and capturing market nuances with the aim of + maximising profit from a market-maker's perspective. + +Since those foundations, on going development has been substantial and arises due to interactions +with industry professionals and identified gaps in features and products. There is always a +focus on performance enhancement and documentation improvement. + +The algorithms and mathematical code developments of *rateslib* are all characterised and +explained in `Coding Interest Rates: FX, Swaps and Bonds `_. .. container:: twocol diff --git a/docs/source/i_guide.rst b/docs/source/i_guide.rst index 00aedfcd8..85204ade9 100644 --- a/docs/source/i_guide.rst +++ b/docs/source/i_guide.rst @@ -475,6 +475,28 @@ around target mid-market rates, and generate market risks. xcs.cashflows(curves=[eur_curve, eurusd_curve, usd_curve, usd_curve], fx=fxf) xcs.cashflows_table(curves=[eur_curve, eurusd_curve, usd_curve, usd_curve], fx=fxf) + .. tab:: NDF + + Non-deliverable forwards (:class:`~rateslib.instruments.NDF`) can be constructed. + + .. ipython:: python + :suppress: + + from rateslib.instruments import NDF + + .. ipython:: python + + ndf = NDF( + settlement=dt(2022, 8, 15), + pair="eurusd", + notional=10e6, # 10mm EUR + calendar="tgt|fed", + fx_rate=1.1 + ) + ndf.rate(fx=fxf) + ndf.cashflows(curves=usd_curve, fx=fxf) + ndf.cashflows_table(curves=usd_curve, fx=fxf) + .. raw:: html
diff --git a/docs/source/i_licence.rst b/docs/source/i_licence.rst index 0e57c5bf4..a61846ecd 100644 --- a/docs/source/i_licence.rst +++ b/docs/source/i_licence.rst @@ -4,64 +4,56 @@ Licence ******* - -This library is released under a **Creative Commons Attribution, Non-Commercial, +*Rateslib* is released under an **Amended Creative Commons Attribution, Non-Commercial, No-Derivatives 4.0 International Licence**. .. raw:: html - - - - - - - - - - - - - -
Academic or Home Educational UseCommercial Use by Anyone in: Banks, Funds, Accountants, Treasuries
FREE to use and modify.
- Not Licenced.
- - Can purchase a licence extension. $300 per year / per user.
- - contact: infomonkey wrench@rateslib.com. - -
+ Academic and home educational use: FREE to use and modify. .. note:: This means that you **can**; - - Download and use the code privately in a non-profit function, such as a learning environment. + - Install and use the code privately, and **not** on a corporate machine, in a non-profit function, + such as a learning environment, or a university. - Modify the code for **private, non-commercial use** only. - Share or redistribute the code, but only in its **entirety without modification**, and **with attribution**, - and such that **end use is non-commercial** and in a non-profit function. + and such that **end use is non-commercial** and in a non-profit function, and distributed + with a copy of this licence. + +.. raw:: html + + Commercial Use: Not licensed. + Purchase User Licences + +This use is defined as any use inside a corporate entity, such as a bank, fund, treasury, +accountant, consultant, corporate, etc. To use *rateslib* for commercial use requires purchasing +a :ref:`licence extension ` on basis that is :ref:`per user `. + .. warning:: This means that you **cannot** (without a licence extension); - - Use the library or code for any form of commercial or profit based activity. You cannot use it - inside a bank, fund company, brokerage firm, or any form of investment firm where - its use is part of the operation, or decision making process, of that entity. + - Install it or import it to any corporate machine or corporate virtual environment. + - Use the library or code for any form of commercial or profit based activity. - Copy or modify the code and use it in any derivative product or commercial activity, such as in a trading application, API or other form of publication. - - Share or redistribute any **sub-part** of the code, or **modified** code, even with attribution. - - Share or redistribute the code in its entirety **without attribution**. - - Include this code, or package, as a **dependency** of any other package. + - Include this code, or package, as a **dependency** of any other package used within + a corporate entity. - Use this code as a benchmark or as a validator for developing your own code - which will be used in a commercial capacity. + which will be used in a capacity by a corporate institution. + +Attribution-NonCommercial-NoDerivatives 4.0 International (as Amended) +====================================================================== -Creative Commons Attribution, Non-Commercial, No-Derivatives 4.0 International Public License -============================================================================================= +Amended Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 +International Public License By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons +to be bound by the terms and conditions of this Amended Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in @@ -106,6 +98,9 @@ Section 1 -- Definitions. or other material to which the Licensor applied this Public License. + All of Rateslib's codebases, documentation, and other training + materials falls under Licensed Material. + f. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the @@ -114,15 +109,38 @@ Section 1 -- Definitions. g. Licensor means the individual(s) or entity(ies) granting rights under this Public License. + The Licensor for Rateslib is Siffrorna Technology Limited. + h. NonCommercial means not primarily intended for or directed towards - commercial advantage or monetary compensation. For purposes of - this Public License, the exchange of the Licensed Material for - other material subject to Copyright and Similar Rights by digital - file-sharing or similar means is NonCommercial provided there is - no payment of monetary compensation in connection with the - exchange. - - i. Share means to provide material to the public by any means or + commercial advantage or monetary compensation. NonCommercial cannot + also be any of the activities defined as Commercial. + + i. Commercial means use intended for or directed towards commercial + advantage or monetary compensation. + + In the context of Rateslib the definition of Commercial includes: + + - Code execution on any physical operating system or virtual + environment owned by a commercial entity. + - Installation on any operating system owned by a commercial entity via + methods such as; direct code transfer from source, installation via PyPI, + installation via Conda. + - Installation in a virtual environment from a machine + owned by a commercial entity, such as in a WebBrowser via PyOdide or + in a BQuant environment via a Bloomberg Terminal. + - Including Rateslib code directly, or as a software dependency, in the + creation of another software product, used either internally by that + creating commercial entity or for transmission or resale to + associates or customers of the creating commercial entity. + + j. First-hand Commercial Use means any Commercial activity used only + internally and exclusively by You. + + k. Second-hand Commercial Use means packaging, distributing and + re-selling any of the functions defined as Commercial to any + third-party. + + l. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material @@ -130,23 +148,45 @@ Section 1 -- Definitions. public may access the material from a place and at a time individually chosen by them. - j. Sui Generis Database Rights means rights other than copyright + m. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. - k. You means the individual or entity exercising the Licensed Rights + n. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. +.. _licence-user: + + o. User is a person or a device that executes Rateslib source code. + A single user constitutes: + + - A person that installs Rateslib on any of their operating systems + or virtual machines and executes its source code non-synchronously. + - A person that connects to a server (local or cloud based) and + executes Rateslib source code remotely accessing the results from + the request. + - A server that installs Rateslib and executes its source code for + any reason, e.g. to perform scheduled daily tasks, generate results, + or respond to queries from incoming API requests. + - A person that regularly uses and consumes streaming results + generated from Rateslib source code on a remote server. + + For the avoidance of doubt a recipient of an isolated report which + has been produced in whole, or in part, by Rateslib is not a User. However, + the producer of that report is a User. + Section 2 -- Scope. ------------------- +.. _licence-2a1: + a. License grant. 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, + the Licensor hereby grants You a worldwide, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: @@ -390,3 +430,30 @@ Section 8 -- Interpretation. as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. + +.. _licence-extension: + +Section 9 -- Commercial Licence Extension +------------------------------------------- + + a. The Licensor may grant explicitly, or for a royalty fee, + a specific amendment to this licence which permits + :ref:`Section 2.a) 1.b) ` for Commercial purposes as well as + NonCommercial. + + b. For the avoidance of doubt :ref:`Section 2.a) 1.a) ` is not + amended under a Commercial Licence Extension. This provides + the distinction between First-Hand Commercial Use and + Second-Hand Commercial Use, the former being permitted + under a Commercial Licence Extension, whilst the latter + remains prohibited. + + c. Commercial Licence Extensions may be granted to an entire + commercial entity or per User. In the case a Commercial + Licence Extension is granted per User the definition of + :ref:`User ` is as given in Section 1. + + d. Commercial Licence Extensions are granted with their own + terms of contract which often involve a negotiated fee + and a date of expiration at which point the licence reverts + back to the NonCommercial version. diff --git a/docs/source/i_purchase.rst b/docs/source/i_purchase.rst new file mode 100644 index 000000000..6c8a40883 --- /dev/null +++ b/docs/source/i_purchase.rst @@ -0,0 +1,30 @@ +.. _purchase-doc: + +************************ +Purchasing User Licences +************************ + +.. raw:: html + +

If you would like to purchase a single or multi-user commercial licence extension, + you may either contact + info@rStockholm Kungsgatanateslib.com + to obtain a purchase order invoice, or use the following payment link: +

+ + +**Cost** + +The cost of a single user licence is currently £244 per user/per year (approx $300), with +the annual period running from the date of purchase. + +The definition of one user can be found in the licence terms: :ref:`here `. + +Annual licences are non-refundable and are not measured pro-rata. However, in the event of +employee changes they are fully transferable. + +Details of the commercial licence extension can also be found in the licence terms: :ref:`here `. + +If you have any question please do not hesitate to contact the above email address. diff --git a/docs/source/index.rst b/docs/source/index.rst index 240cfe671..164ad90ea 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -30,40 +30,19 @@ *Rateslib* is a state-of-the-art **fixed income library** designed for Python. Its purpose is to provide advanced, flexible and efficient fixed income analysis -with a high level, well documented API. *Rateslib* is not freely licensed, it is copyrightable -software provided as below. +with a high level, well documented API. -.. raw:: html +Licence +======= -
+*Rateslib* is released under an **Amended Creative Commons Attribution, Non-Commercial, +No-Derivatives 4.0 International Licence**. For more details see :ref:`here`. .. raw:: html - - - - - - - - - - - - - -
Academic or Home Educational UseCommercial Use by Anyone in: Banks, Funds, Accountants, Treasuries
FREE to use and modify.
- Not Licenced - Cannot be installed on a corporate machine without permission.
- - Can purchase a licence extension. $300 per year / per user.
- - contact: infoLively magic@rateslib.com - -
- -.. The techniques and object interaction within *rateslib* were inspired by - the requirements of multi-disciplined fixed income teams working, both cooperatively - and independently, within global investment banks. + Academic and at-home educational use: FREE to use and modify.
+ Commercial use: Not licensed for any use (funds, banks, etc,). + Purchase User Licences .. raw:: html @@ -82,38 +61,34 @@ with Python.
-.. container:: twocol - - .. container:: leftside50 - - .. image:: _static/rateslib_excel_logo_label.png - :align: center - :alt: Excel bindings for rateslib - :width: 203 - :target: https://rateslib.com/excel/latest/ - - .. raw:: html - -
- Rateslib-excel provides Excel bindings to use - all of rateslib's functionality in Excel. -
- - - .. container:: rightside50 - - .. image:: _static/rateslib_rs_logo_label.png - :align: center - :alt: Rust codebase for rateslib - :width: 203 - :target: https://rateslib.com/rs/latest/rateslib - - .. raw:: html - -
- Rateslib-rs is the backend codebase - for parts of rateslib written in Rust using PyO3. -
+
+
+ Rateslib-Excel +
+
+ rateslib-excel provides Excel bindings for the Python library, to users + with a commercial licence extension. +
+
+
+
+ Rateslib-JS +
+
+ rateslib-js allows integration with JavaScript/TypeScript via PyOdide, which is + a Python interpreter for web browsers. The demo page gives a browser build where the code is shown in source, + and integrates with Vue.js. Also see this LinkedIn article example. +
+
+
+
+ Rateslib-Rust +
+
+ rateslib-rs is the lower level codebase written in Rust, with PyO3 bindings, + providing performant solutions for some of the Python classes and methods. +
+
.. raw:: html @@ -220,12 +195,6 @@ own forward mode module. The test coverage is very high. -Licence -======= - -This library is released under a **Creative Commons Attribution, Non-Commercial, -No-Derivatives 4.0 International Licence**. See :ref:`here` for more details. - Get Started =========== @@ -244,3 +213,4 @@ Move on to the next page to :ref:`Get Started` i_api.rst i_whatsnew.rst i_developers.rst + i_purchase.rst diff --git a/docs/source/z_curve_from_zero_rates.ipynb b/docs/source/z_curve_from_zero_rates.ipynb index 7a423014d..421ba3a50 100644 --- a/docs/source/z_curve_from_zero_rates.ipynb +++ b/docs/source/z_curve_from_zero_rates.ipynb @@ -30,7 +30,7 @@ "$$\n", "v = exp ( - d \\bar{r} )\n", "$$\n", - "where $d$ is the day count fraction (DCF) measured between 'today' and the 'maturity' date of the rate, using the ``convention`` assocoiated with the rates. \n", + "where $d$ is the day count fraction (DCF) measured between 'today' and the 'maturity' date of the rate, using the ``convention`` associated with the rates.\n", "\n", "In **rateslib** a ``Curve`` is defined by DF nodes, so if one wants to construct a ``Curve`` from zero rates either these have to be manually converted to DFs or the ``Solver`` can be used to determine them via calibration." ] @@ -90,17 +90,13 @@ "cell_type": "markdown", "id": "4face5a4-0e12-4632-bdb0-bbbcfa2fbd20", "metadata": {}, - "source": [ - "If cubic spline interpolation was required this could be included within the ``curve_from_zero_rates`` function using the ``t`` argument from a ``Curve``." - ] + "source": "If cubic spline interpolation is required this could be included within the ``curve_from_zero_rates`` function using the ``t`` argument from a ``Curve``." }, { "cell_type": "markdown", "id": "ab2249f1-4730-4acd-87b6-8dd7abd10e72", "metadata": {}, - "source": [ - "### Using a Solver" - ] + "source": "### Using a Solver and `Value` Instruments" }, { "cell_type": "markdown", diff --git a/pyproject.toml b/pyproject.toml index 89d31c6d5..0c6a5fadd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -161,6 +161,7 @@ strict = true [tool.coverage.run] omit = [ "/typing.py", + # "python/tests/*" ] [tool.isort]