/usr/share/octave/packages/financial-0.5.0/doc-cache is in octave-financial 0.5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 | # doc-cache created by Octave 4.0.0
# name: cache
# type: cell
# rows: 3
# columns: 80
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
binprice
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2267
-- Function File: [ASSETPRICE, OPTIONVALUE] = binprice (PRICE, STRIKE,
RATE, TIME, INCREMENT, VOLATILITY, OPTTYPE)
-- Function File: [ASSETPRICE, OPTIONVALUE] = binprice (PRICE, STRIKE,
RATE, TIME, INCREMENT, VOLATILITY, OPTTYPE, DIVIDENDRATE)
-- Function File: [ASSETPRICE, OPTIONVALUE] = binprice (PRICE, STRIKE,
RATE, TIME, INCREMENT, VOLATILITY, OPTTYPE, DIVIDENDRATE,
DIVIDEND, EXDIV)
Compute American call and put option prices using a binomial tree.
-- Variable: PRICE The current price of the underlying asset.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: INCREMENT Time increment. INCREMENT is rounded to
ensure that TIME/INCREMENT is an integer.
-- Variable: VOLATILITY The volatility of the underlying asset.
-- Variable: OPTTYPE Option type. 1 = call option, 0 = put
option.
-- Variable: DIVIDENDRATE (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
-- Variable: DIVIDEND (Optional, default = 0) The dividend
payment at an ex-dividend date as specified by EXDIV.
-- Variable: EXDIV (Optional, default = 0) A vector used to
determine the ex-dividend dates. For each j, EXDIV(j) *
INCREMENT is the corresponding dividend date.
Computes the American call and put option prices using the
Cox-Ross-Rubinstein binomial tree.
Discrete dividends (i.e. DIVIDEND and EXDIV) have not yet been
implemented.
Binomial trees are a particular explicit finite difference method
for solving the Black-Scholes equation (see 'M. Rubinstein. On the
relation between binomial and trinomial option pricing models.
Journal of Derivatives, 8(2):47-50, 2000'), and exhibit linear
convergence along with the usual strict stability requirements of
an explicit method. The serious practitioner should consider using
a more sophisticated method, and use binomial trees only for
explanatory or heuristic purposes.
See also: blkprice, blsprice.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Compute American call and put option prices using a binomial tree.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
blkimpv
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1485
-- Function File: VOLATILITY = blkimpv (PRICE, STRIKE, RATE, TIME,
VALUE)
-- Function File: VOLATILITY = blkimpv (PRICE, STRIKE, RATE, TIME,
VALUE, LIMIT)
-- Function File: VOLATILITY = blkimpv (PRICE, STRIKE, RATE, TIME,
VALUE, LIMIT, TOLERANCE)
-- Function File: VOLATILITY = blkimpv (PRICE, STRIKE, RATE, TIME,
VALUE, LIMIT, TOLERANCE, CLASS)
Compute implied volatility under the Black-Scholes model.
-- Variable: PRICE The current price of the underlying asset (a
futures contract).
-- Variable: STRIKE Exercise price of the futures option.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VALUE Price of the European option from which the
underlying's volatility is derived.
-- Variable: LIMIT (Optional, default = 10) Upper bound of the
implied volatility.
-- Variable: TOLERANCE (Optional, default = 1e-6) Tolerance with
which the root-finding method terminates.
-- Variable: CLASS (Optional, default = {'call'}) Option class
(call or put). To specify a call option, use a value of true
or {'call'}. To specify put options, use a value of false or
{'put'}.
Computes the implied volatility under the Black-Scholes model from
a given market option price.
See also: blsdelta, blsgamma, blslambda, blsprice, blsrho,
blstheta.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
Compute implied volatility under the Black-Scholes model.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blkprice
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 547
-- Function File: [CALL, PUT] = blkprice (PRICE, STRIKE, RATE, TIME,
VOLATILITY)
Compute European call and put option price using the Black-76
model.
-- Variable: PRICE The current price of the underlying asset (a
futures contract).
-- Variable: STRIKE Exercise price of the futures option.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VOLATILITY The volatility of the underlying asset.
See also: binprice, blsprice.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Compute European call and put option price using the Black-76 model.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blsdelta
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 884
-- Function File: [CALLDELTA, PUTDELTA] = blsdelta (PRICE, STRIKE,
RATE, TIME, VOLATILITY)
-- Function File: [CALLDELTA, PUTDELTA] = blsdelta (PRICE, STRIKE,
RATE, TIME, VOLATILITY, YIELD)
-- Variable: PRICE The current price of the underlying asset.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VOLATILITY The volatility of the underlying asset.
-- Variable: YIELD (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
Computes the Black-Scholes delta, the rate of change of the option
value with respect to the value of the underlying asset.
See also: blsgamma, blslambda, blsprice, blsrho, blstheta, blsvega.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
-- Variable: PRICE The current price of the underlying asset.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blsgamma
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 886
-- Function File: GAMMA = blsgamma (PRICE, STRIKE, RATE, TIME,
VOLATILITY)
-- Function File: GAMMA = blsgamma (PRICE, STRIKE, RATE, TIME,
VOLATILITY, YIELD)
Compute Black-Scholes gamma.
-- Variable: PRICE The current price of the underlying asset.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VOLATILITY The volatility of the underlying asset.
-- Variable: YIELD (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
Computes the Black-Scholes gamma, the rate of change of the option
delta with respect to the value of the underlying asset.
See also: blsdelta, blslambda, blsprice, blsrho, blstheta, blsvega.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Compute Black-Scholes gamma.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
blsimpv
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1723
-- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
VALUE)
-- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
VALUE, LIMIT)
-- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
VALUE, LIMIT, YIELD)
-- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
VALUE, LIMIT, YIELD, TOLERANCE)
-- Function File: VOLATILITY = blsimpv (PRICE, STRIKE, RATE, TIME,
VALUE, LIMIT, YIELD, TOLERANCE, CLASS)
Computes implied volatility under the Black-Scholes model.
-- Variable: PRICE The current price of the underlying asset.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VALUE Price of the European option from which the
underlying's volatility is derived.
-- Variable: LIMIT (Optional, default = 10) Upper bound of the
implied volatility.
-- Variable: YIELD (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
-- Variable: TOLERANCE (Optional, default = 1e-6) Tolerance with
which the root-finding method terminates.
-- Variable: CLASS (Optional, default = {'call'}) Option class
(call or put). To specify a call option, use a value of true
or {'call'}. To specify put options, use a value of false or
{'put'}.
Computes the implied volatility under the Black-Scholes model from
a given market option price.
See also: blsdelta, blsgamma, blslambda, blsprice, blsrho,
blstheta.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Computes implied volatility under the Black-Scholes model.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
blslambda
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1535
-- Function File: [CALLEL, PUTEL] = blslambda (PRICE, STRIKE, RATE,
TIME, VOLATILITY)
-- Function File: [CALLEL, PUTEL] = blslambda (PRICE, STRIKE, RATE,
TIME, VOLATILITY, YIELD)
Computes elasticity of option under the Black-Scholes model.
-- Variable: PRICE The current price of the underlying asset.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VOLATILITY The volatility of the underlying asset.
-- Variable: YIELD (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
Computes the elasticity of an option under the Black-Scholes model.
Elasticity measures the percent change in the option price per
percent change in the underlying asset price.
Update: the following bug has been fixed in MATLAB R2014a(5.3):
There is a bug in the MATLAB version of blslambda in which the
deltas of the option are not discounted by YIELD in the nonzero
dividend case. That is, they compute normcdf(d1) * S / V when they
should compute exp(-Yield*T) * normcdf(d1) * S / V. At the time of
writing, this bug is present in the financial toolbox shipped with
R2013a. Both this version of blslambda and that shipped with
R2013a agree when there are no dividends.
See also: blsdelta, blsgamma, blsprice, blsrho, blstheta, blsvega.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Computes elasticity of option under the Black-Scholes model.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blsprice
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 895
-- Function File: [CALL, PUT] = blsprice (PRICE, STRIKE, RATE, TIME,
VOLATILITY)
-- Function File: [CALL, PUT] = blsprice (PRICE, STRIKE, RATE, TIME,
VOLATILITY, YIELD)
Compute European call and put option prices.
-- Variable: PRICE The current price of the underlying asset.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VOLATILITY The volatility of the underlying asset.
-- Variable: YIELD (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
Computes the European call and put option prices using the
Black-Scholes model.
See also: blskprice, blsdelta, blsgamma, blsimpv, blslambda,
blsrho, blstheta, blsvega.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Compute European call and put option prices.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
blsrho
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 901
-- Function File: [CALLRHO, PUTRHO] = blsrho (PRICE, STRIKE, RATE,
TIME, VOLATILITY)
-- Function File: [CALLRHO, PUTRHO] = blsrho (PRICE, STRIKE, RATE,
TIME, VOLATILITY, YIELD)
Compute the Black-Scholes rho.
* Variable: PRICE The current price of the underlying asset.
* Variable: STRIKE The strike price the option is written on.
* Variable: RATE The risk-free interest rate.
* Variable: TIME The time-to-expiry.
* Variable: VOLATILITY The volatility of the underlying asset.
* Variable: YIELD (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
Computes the Black-Scholes rho, the rate of change of the option
value with respect to the risk-free interest rate.
See also: blsdelta, blsgamma, blslambda, blsprice, blstheta,
blsvega.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Compute the Black-Scholes rho.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
blstheta
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 907
-- Function File: [CALLTHETA, PUTTHETA] = blstheta (PRICE, STRIKE,
RATE, TIME, VOLATILITY)
-- Function File: [CALLTHETA, PUTTHETA] = blstheta (PRICE, STRIKE,
RATE, TIME, VOLATILITY, YIELD)
Compute the Black-Scholes theta.
-- Variable: PRICE The current price of the underlying asset.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VOLATILITY The volatility of the underlying asset.
-- Variable: YIELD (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
Computes the Black-Scholes theta, the rate of change of the option
value with respect to the time-to-expiry.
See also: blsdelta, blsgamma, blslambda, blsprice, blsrho, blsvega.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Compute the Black-Scholes theta.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
blsvega
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 896
-- Function File: VEGA = blsvega (PRICE, STRIKE, RATE, TIME,
VOLATILITY)
-- Function File: VEGA = blsvega (PRICE, STRIKE, RATE, TIME,
VOLATILITY, YIELD)
Computes the Black-Scholes vega.
-- Variable: PRICE The current price of the underlying asset.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: RATE The risk-free interest rate.
-- Variable: TIME The time-to-expiry.
-- Variable: VOLATILITY The volatility of the underlying asset.
-- Variable: YIELD (Optional, default = 0) Annualized,
continuously compounded rate of dividends of the underlying
asset.
Computes the Black-Scholes vega, the rate of change of the option
value with respect to the volatility of the underlying asset.
See also: blsdelta, blsgamma, blslambda, blsprice, blsrho,
blstheta.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Computes the Black-Scholes vega.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2
bm
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 314
-- Function File: BM = bm (MU, SIGMA)
-- Function File: BM = bm (MU, SIGMA, OPTIONNAME, OPTIONVALUE, ...)
Creates an object to represent an arithmetic Brownian motion:
dX_t = MU(t)dt + SIGMA(t)dW_t.
See the @sde documentation for a list of optional arguments.
See also: sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Creates an object to represent an arithmetic Brownian motion:
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
bolling
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 712
-- Function File: bolling (ASSET, SAMPLES)
-- Function File: bolling (ASSET, SAMPLES, ALPHA)
-- Function File: bolling (ASSET, SAMPLES, ALPHA, WIDTH)
-- Function File: [MOVAVG, UPPERBAND, LOWERBAND] = bolling (ASSET,
SAMPLES, ...)
If no output is requested, plot the bollinger bands of the ASSET.
If output is requested, return the values for the bollinger bands.
If given, ALPHA is the weighting power of the moving average; 0
(default) is the simple moving average, see 'movavg' for the full
definition. WIDTH is the number of standard deviations to plot
above and below the moving average (default: 2).
See also: movavg, candle, dateaxis, highlow, pointfig.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
If no output is requested, plot the bollinger bands of the ASSET.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
busdate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 832
-- Function File: b = busdate (refdate)
-- Function File: b = busdate (refdate, direction)
-- Function File: b = busdate (refdate, direction, holiday)
-- Function File: b = busdate (refdate, direction, holiday, weekend)
Return the datenum of the next or previous business day from
REFDATE. DIRECTION indicates the next day (default) if 1 and the
previous day if -1. HOLIDAY is a vector of datenums that defines
the holidays observed (the holidays function is used if not given).
WEEKEND defines the days of the week that should be considered
weekends; [1 0 0 0 0 0 1] (default) indicates that Sunday and
Saturday are holidays.
If any of the optional inputs (DIRECTION, HOLIDAY, WEEKEND) are
empty, then the default is used.
See also: holidays, lbusdate, isbusday, fbusdate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
Return the datenum of the next or previous business day from REFDATE.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
busdays
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 863
-- Function File: BDATES = busdays (SDATE, EDATE)
-- Function File: BDATES = busdays (SDATE, EDATE, BDMODE)
-- Function File: BDATES = busdays (SDATE, EDATE, BDMODE, HOLVEC)
Generate a list of business dates at the end of the periods defined
between (including) SDATE and EDATE.
SDATE is the starting date, EDATE is the ending date, both are in
serial date format (see datenum). BDMODE is the business day
frequency ("daily", "weekly", "monthly", "quarterly", "semiannual",
or "annual"); these can be abbreviated by the first letter and they
may also use an integer corresponding to the order in the above
list (i.e. "daily" = 1). HOLVEC is an optional list of holidays.
If the holidays are not given, then the holidays function is used.
See also: holidays, busdate, lbusdate, isbusday, fbusdate, datenum.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Generate a list of business dates at the end of the periods defined
between (inc
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
cev
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 422
-- Function File: CEV = cev (RETURN, ALPHA, SIGMA)
-- Function File: CEV = cev (RETURN, ALPHA, SIGMA, OPTIONNAME,
OPTIONVALUE, ...)
Creates an object to represent a constant elasticity of variance
(CEV) stochastic differential equation (SDE):
dX_t = (RETURN(t) * X_t)dt + (diag(X_t.^ALPHA(t)) * SIGMA(t))dW_t
See the @sde documentation for a list of optional arguments.
See also: sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a constant elasticity of variance (CEV)
stochasti
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
cfconv
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 303
-- Function File: CFCONV = cfconv (CF, YIELD)
Calculate convexity CFCONV from given fixed-paid cash flow CF and
period yield YIELD.
Reference:
[1] http://thismatter.com/money/bonds/duration-convexity.htm
[2] http://en.wikipedia.org/wiki/Bond_convexity
See also: cfdur.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Calculate convexity CFCONV from given fixed-paid cash flow CF and period
yield Y
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
cfdur
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 327
-- Function File: [DUR, MOD_DUR] = cfdur (CF, YIELD)
Calculate duration DUR and modified duration MOD_DUR, from given
fixed-paid cash flow CF and period yield YIELD.
Reference: http://en.wikipedia.org/wiki/Bond_duration Using
periodic compounding instead of continuous compounding.
See also: cfconv.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Calculate duration DUR and modified duration MOD_DUR, from given
fixed-paid cash
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
cir
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 410
-- Function File: CIR = cir (SPEED, LEVEL, SIGMA)
-- Function File: CIR = cir (SPEED, LEVEL, SIGMA, OPTIONNAME,
OPTIONVALUE, ...)
Creates an object to represent a Cox-Ingersoll-Ross (CIR)
mean-reverting square root diffusion:
dX_t = (SPEED(t) * (LEVEL(t) - X_t))dt + (diag(X_t.^1/2) * SIGMA(t))dW_t.
See the @sde documentation for a list of optional arguments.
See also: sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a Cox-Ingersoll-Ross (CIR) mean-reverting
square
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
corr2cov
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 277
-- Function File: COV = corr2cov (SIGMA, CORR)
Convert standard deviation SIGMA and correlation coefficients CORR
to covariance COV.
Note that the rate R is specified as a fraction (i.e., 0.05, not 5
percent).
See also: corrcoef, cov, cov2corr, std.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert standard deviation SIGMA and correlation coefficients CORR to
covariance
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
cov2corr
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 202
-- Function File: [SIGMA, CORR] = cov2corr (COV)
Convert covariance COV from input to standard deviation SIGMA and
correlation coefficients CORR.
See also: corr2cov, corrcoef, cov, std.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert covariance COV from input to standard deviation SIGMA and
correlation co
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
dateaxis
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 664
-- Function File: dateaxis ()
-- Function File: dateaxis (AX)
-- Function File: dateaxis (AX, DATEFORM)
-- Function File: dateaxis (AX, DATEFORM, STARTDATE)
-- Function File: dateaxis (H, ...)
Convert the current axis tick labels (or the axis handle H) to a
date format. The axis given by AX ("x", "y", or "z") will be
changed; the default is "x". The date format, DATEFORM, used will
be either auto-determined or an integer corresponding to the date
formats in datestr. If STARTDATE is given, then the first tick
value on the given axis is assumed to be that date.
See also: bolling, candle, highlow, movavg, pointfig.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 77
Convert the current axis tick labels (or the axis handle H) to a date
format.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
datefind
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 202
-- Function File: indices = datefind (subset, superset, tol)
Find any instances of the 'subset' in the 'superset' with the
'tol'erance. 'tol' is 0 by default.
See also: date, datenum.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
Find any instances of the 'subset' in the 'superset' with the
'tol'erance.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
day
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 323
-- Function File: day (DATE)
-- Function File: day (DATE, F)
Return hours of a date.
For a given DATE in a serial date number or date string format,
returns its day. The optional variable F, specifies the format
string used to interpret date strings.
See also: date, datevec, now, month, year.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Return hours of a date.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
daysact
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 577
-- Function File: daysact (D1)
-- Function File: daysact (D1, D2)
Calculates the number of days between two dates. If the second
date is not given, calculate the number of days since 1-Jan-0000.
The variables D1 and D2 can either be strings or an N-row string
matrix. If both D1 and D2 are string matrices, then the number of
rows must match. An example of the use of 'daysact' is
daysact ("01-Jan-2007", ["10-Jan-2007"; "23-Feb-2007"; "23-Jul-2007"])
=> 9
53
203
See also: datenum.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Calculates the number of days between two dates.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
easter
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 210
-- Function File: [m, d] = easter (y)
-- Function File: datenum = easter (y)
Return the month (M) and day (D) of Easter in the Gregorial
calendar on a given year or years.
See also: holidays.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the month (M) and day (D) of Easter in the Gregorial calendar on
a given
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
effrr
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 189
-- Function File: RETURN = effrr (RATE, NUMPERIODS)
Compute the effective rate of return based on a nominal RATE over a
number of periods, NUMPERIODS.
See also: irr, nomrr.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the effective rate of return based on a nominal RATE over a
number of pe
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
eomdate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 167
-- Function File: E = eomdate (Y, M)
Return the last day of the month M for the year Y in datenum
format.
See also: datenum, datevec, weekday, eomday.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Return the last day of the month M for the year Y in datenum format.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
fbusdate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 672
-- Function File: b = fbusdate (year, month)
-- Function File: b = fbusdate (year, month, holiday)
-- Function File: b = fbusdate (year, month, holiday, weekend)
Return the datenum of the first business day of the YEAR and MONTH.
HOLIDAY is a vector of datenums that defines the holidays observed
(the holidays function is used if not given). WEEKEND defines the
days of the week that should be considered weekends; [1 0 0 0 0 0
1] (default) indicates that Sunday and Saturday are holidays.
If any of the optional inputs (HOLIDAY, WEEKEND) are empty, then
the default is used.
See also: holidays, lbusdate, isbusday, busdate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Return the datenum of the first business day of the YEAR and MONTH.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
fetch
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1239
-- DATA =: fetch (CONN, SYMBOL)
-- DATA =: fetch (..., FIELDS)
-- DATA =: fetch (..., DATE)
-- DATA =: fetch (..., FROMDATE, TODATE)
-- DATA =: fetch (..., PERIOD)
-- [DATA, FIELDS] =: fetch (...)
Download stock data from a connection.
FIELDS are the data fields to download and must come from the set
* "Symbol"
* "Last"
* "Date"
* "Time"
* "Change"
* "Open"
* "High",
* "Low"
* "Volume"
As an output, FIELDS may be different than your request. This is
because there is mapping of field names from the data source to the
output, and what is returned is the source mapping to allow
validation.
DATE is the date string or datenum for the requested data. If you
enter today's date, you will get yesterday's data. FROMDATE and
TODATE allow you to specify a date range for the data.
PERIOD (default: "d") allows you to select the period for the data
which can be any of the below as long as they are supported by the
associated backend.
* 'd': daily
* 'w': weekly (Yahoo only)
* 'm': monthly (Yahoo only)
* 'v': dividends (Yahoo only)
See also: yahoo, google.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Download stock data from a connection.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2
fv
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 548
-- Function File: fv (R, N, P, L, METHOD)
Return the future value at the end of period N of an investment
which consists of N payments of P in each period, assuming an
interest rate R.
The optional argument L may be used to specify an additional
lump-sum payment.
The optional argument METHOD may be used to specify whether the
payments are made at the end ('"e"', default) or at the beginning
('"b"') of each period.
Note that the rate R is specified as a fraction (i.e., 0.05, not 5
percent).
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the future value at the end of period N of an investment which
consists o
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
fvl
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 251
-- Function File: fvl (R, N, L)
Return the future value at the end of N periods of an initial lump
sum investment L, given a per-period interest rate R.
Note that the rate R is specified as a fraction (i.e., 0.05, not 5
percent).
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the future value at the end of N periods of an initial lump sum
investmen
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
gbm
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 353
-- Function File: GBM = gbm (RETURN, SIGMA)
-- Function File: GBM = gbm (RETURN, SIGMA, OPTIONNAME, OPTIONVALUE,
...)
Creates an object to represent a geometric Brownian motion (GBM):
dX_t = (RETURN(t) * X_t)dt + (diag(X_t) * SIGMA(t))dW_t
See the @sde documentation for a list of optional arguments.
See also: sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Creates an object to represent a geometric Brownian motion (GBM):
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
google
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 414
-- Function File: CONN = google ()
-- Function File: CONN = google (URL, IPADDRESS, PORT)
Prepare a Google connection for the fetch command to get Google
historical quote data.
If given, the URL must be "http://finance.google.com". The
IPADDRESS and PORT is the proxy ipaddress and port. These
parameters are currently ignored (with a warning if given).
See also: fetch, yahoo.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Prepare a Google connection for the fetch command to get Google
historical quote
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
heston
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 484
-- Function File: HESTON = heston (RETURN, SPEED, LEVEL, VOLATILITY)
-- Function File: HESTON = heston (RETURN, SPEED, LEVEL, VOLATILITY,
OPTIONNAME, OPTIONVALUE, ...)
Creates an object to represent a Heston stochastic volatility
model:
dX_1 = (RETURN(t) * X_1)dt + (sqrt (X_2) * X_1)dW_1;
dX_2 = (SPEED(t) * (LEVEL(t) - X_2))dt + (sqrt (X_2) * VOLATILITY(t))dW_2.
See the @sde documentation for a list of optional arguments.
See also: sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Creates an object to represent a Heston stochastic volatility model:
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
hhigh
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 286
-- Function File: HHV = hhigh (DATA)
-- Function File: HHV = hhigh (DATA, NPERIODS)
-- Function File: HHV = hhigh (DATA, NPERIODS, DIM)
Compute the highest high value of DATA for the past NPERIODS
(default: 14) across the dimension, DIM (default: 1).
See also: llow.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the highest high value of DATA for the past NPERIODS (default:
14) acros
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
highlow
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 470
-- Function File: H = highlow (HIGH, LOW, CLOSE)
-- Function File: H = highlow (HIGH, LOW, CLOSE, OPEN)
-- Function File: H = highlow (HIGH, LOW, CLOSE, OPEN, COLOR)
Plot the HIGH, LOW, and CLOSE of a security. The CLOSE is plotted
as a tick to the right, and if OPEN is given and non-empty, it is
plotted as a tick to the left. The color can override the default
color for the plot.
See also: bolling, candle, dateaxis, movavg, pointfig.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Plot the HIGH, LOW, and CLOSE of a security.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
holidays
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1765
-- Function File: H = holidays
-- Function File: H = holidays (STARTDATE, ENDDATE)
List holidays and non-trading days.
Returns vector H of all holidays and non-trading days between
STARTDATE and ENDDATE, inclusive. Output dates are in the serial
day number format. Any date format accepted by 'datevec' can be
used. If called with no input arguments, returns all holidays
between the 1st of January of 1885 and 31st of December of 2050.
For example, to get all holidays for 2007 (02-Jan-2007 was mourning
day of Gerald Ford. See below for comments on such special
occasions):
holidays ("jan 01 2007", "dec 31 2007")
=> 733043
733044
733057
733092
733138
733190
733227
733288
733368
733401
For ease of read, the output of 'holidays' can be passed to
'datestr'. Also, the function 'now' can be used to list all dates
until current date.
datestr (holidays ("may 01 2012", now))
=> 28-May-2012
04-Jul-2012
03-Sep-2012
These holidays are trading holidays observed by the NYSE according
to its rule 51.10. It also tries to take into account the
exceptions due to "unusual business conditions" or for additional
days that have been called as holidays for one-time purposes.
However, as these are unpredictable by nature only the ones until
2011/02/01 have been listed.
The complete list can be found at
http://www.chronos-st.org/NYSE_Observed_Holidays-1885-Present.html
See also: busdate, lbusdate, isbusday, fbusdate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
List holidays and non-trading days.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
hour
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 330
-- Function File: hour (DATE)
-- Function File: hour (DATE, F)
Return hours of a date.
For a given DATE in a serial date number or date string format,
returns its hours. The optional variable F, specifies the format
string used to interpret date strings.
See also: date, datevec, now, minute, second.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Return hours of a date.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
hwv
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 372
-- Function File: HWV = hwv (SPEED, LEVEL, SIGMA)
-- Function File: HWV = hwv (SPEED, LEVEL, SIGMA, OPTIONNAME,
OPTIONVALUE, ...)
Creates an object to represent a Hull-White/Vasicek (HWV)
diffusion:
dX_t = (SPEED(t) * (LEVEL(t) - X_t))dt + SIGMA(t)dW_t.
See the @sde documentation for a list of optional arguments.
See also: sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
Creates an object to represent a Hull-White/Vasicek (HWV) diffusion:
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
irr
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 263
-- Function File: irr (P, I)
Return the internal rate of return of a series of payments P from
an initial investment I (i.e., the solution of 'npv (r, p) = i'.
If the second argument is omitted, a value of 0 is used.
See also: npv, pv, rate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the internal rate of return of a series of payments P from an
initial inv
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
isbusday
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 551
-- Function File: r = isbusday (refdate)
-- Function File: r = isbusday (refdate, holiday)
-- Function File: r = isbusday (refdate, holiday, weekend)
Return true if the REFDATE is a business date REFDATE. HOLIDAY is
a vector of datenums that defines the holidays observed (the
holidays function is used if not given). WEEKEND defines the days
of the week that should be considered weekends; [1 0 0 0 0 0 1]
(default) indicates that Sunday and Saturday are weekends.
See also: holidays, lbusdate, busdate, fbusdate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Return true if the REFDATE is a business date REFDATE.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
lbusdate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 671
-- Function File: b = lbusdate (year, month)
-- Function File: b = lbusdate (year, month, holiday)
-- Function File: b = lbusdate (year, month, holiday, weekend)
Return the datenum of the last business day of the YEAR and MONTH.
HOLIDAY is a vector of datenums that defines the holidays observed
(the holidays function is used if not given). WEEKEND defines the
days of the week that should be considered weekends; [1 0 0 0 0 0
1] (default) indicates that Sunday and Saturday are holidays.
If any of the optional inputs (HOLIDAY, WEEKEND) are empty, then
the default is used.
See also: holidays, fbusdate, isbusday, busdate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
Return the datenum of the last business day of the YEAR and MONTH.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
llow
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 282
-- Function File: LLV = llow (DATA)
-- Function File: LLV = llow (DATA, NPERIODS)
-- Function File: LLV = llow (DATA, NPERIODS, DIM)
Compute the lowest low value of DATA for the past NPERIODS
(default: 14) across the dimension, DIM (default: 1).
See also: hhigh.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the lowest low value of DATA for the past NPERIODS (default: 14)
across
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
lweekdate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 277
-- Function File: last = lweekdate (weekday, year, month, nextday)
Returns the last occurrence of WEEKDAY from the MONTH and YEAR. If
the optional NEXTDAY argument is given, then the week must also
contain NEXTDAY.
See also: eomdate, nweekdate, weekday.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
Returns the last occurrence of WEEKDAY from the MONTH and YEAR.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
m2xdate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 960
-- Function File: exceldatenums = m2xdate (datenums)
-- Function File: exceldatenums = m2xdate (datenums, convention)
-- Function File: exceldatenums = m2xdate (datenums, convention,
"ExcelBug")
Convert DATENUMS from the internal date format to the format used
by Microsoft Excel. If set to 0 (default, Excel for Windows),
CONVENTION specifies to use the Excel 1900 convention where Jan 1,
1900 corresponds to Excel serial date number 1. If set to 1 (Excel
for Mac), CONVENTION specifies to use the Excel 1904 convention
where Jan 1, 1904 corresponds to Excel serial date number 0.
Note that this does not take into account the Excel bug where 1900
is considered to be a leap year unless you give the "ExcelBug"
option.
Excel does not represent dates prior to 1 January 1900 using this
format, so a warning will be issued if any dates preceed this date.
See also: datenum, x2mdate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert DATENUMS from the internal date format to the format used by
Microsoft E
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
macd
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 726
-- Function File: [MACDVEC, NINEPERMA] = macd (DATA)
-- Function File: [MACDVEC, NINEPERMA] = macd (DATA, DIM)
Calculate the Moving Average Convergence/Divergence (MACD) line of
an asset from the vector of prices (DATA). Also calculate the
nine-period exponential moving average from the MACD line. If
given, DIM indicates whether each row is a set of observations (dim
= 2) or each column is a set of observations (dim = 1, the
default).
The MACD line is calculated as the twelve-period exponential moving
average (EMA) minus the 26-period EMA. Closing prices are typically
used for the moving averages. The nine-period EMA of the MACD line
is used as the signal line.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Calculate the Moving Average Convergence/Divergence (MACD) line of an
asset from
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
minute
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 336
-- Function File: minute (DATE)
-- Function File: minute (DATE, F)
Return minutes of a date.
For a given DATE in a serial date number or date string format,
returns its minutes. The optional variable F, specifies the format
string used to interpret date strings.
See also: date, datevec, now, hour, second.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Return minutes of a date.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
mirr
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 336
-- Function File: RETURN = mirr (CASHFLOW, FINRATE, REINVESTRATE)
Compute the modified internal rate of return. Take periodic
CASHFLOWs as a vector and the finance rate, FINRATE, for negative
cash flows and a reinvestment rate, REINVESTRATE, for positive cash
flows.
See also: irr, effrr, nomrr, pvvar, xirr.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Compute the modified internal rate of return.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
month
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 389
-- Function File: [NUM, STR] = month (DATE)
-- Function File: [...] = month (DATE, F)
Return month of a date.
For a given DATE in a serial date number or date string format,
returns its month number (NUM) or 3 letter name (STR).
The optional variable F, specifies the format string used to
interpret date strings.
See also: date, datevec, now, day, year.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Return month of a date.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
months
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 513
-- Function File: mos = months (startdate, enddate)
-- Function File: mos = months (startdate, enddate, endmonthflag)
Return the number of whole months between STARTDATE and ENDDATE.
ENDMONTHFLAG defaults to 1.
If ENDMONTHFLAG is true, then if both the STARTDATE and the ENDDATE
are end of month dates and ENDDATE has fewer days in the month than
STARTDATE, ENDMONTHFLAG = 1 treats ENDDATE as the end of a month,
but ENDMONTHFLAG = 0 does not.
See also: yeardays, yearfrac.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Return the number of whole months between STARTDATE and ENDDATE.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
movavg
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 724
-- Function File: movavg (ASSET, LEAD, LAG)
-- Function File: movavg (ASSET, LEAD, LAG, ALPHA)
-- Function File: [SHORT, LONG] = movavg (ASSET, LEAD, LAG, ALPHA)
Calculate the LEADing and LAGging moving average of an ASSET. If
given, ALPHA is the weighting power of the delay; 0 (default) is
the simple moving average, 0.5 would be the square root weighted
moving average, 1 would be linear, 2 would be squared, ..., and 'e'
is the exponential moving average.
If no output is requested the data is plotted. The plots are drawn
in the following order: asset, lag, lead. If output is requested,
no plot is generated.
See also: bolling, candle, dateaxis, highlow, pointfig.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
Calculate the LEADing and LAGging moving average of an ASSET.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
negvolidx
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 569
-- Function File: NVI = negvolidx (CLOSEPRICE, VOL)
-- Function File: NVI = negvolidx ([CLOSEPRICE VOL])
-- Function File: NVI = negvolidx (CLOSEPRICE, VOL, INITNVI)
-- Function File: NVI = negvolidx ([CLOSEPRICE VOL], INITNVI)
Compute the negative volume index of a security based on its
closing price (CLOSEPRICE) and VOLume. They may be given as
separate arguments or as an nx2 matrix. If given, the INITNVI is
the starting value of the nvi (default: 100).
The NVI will always be a column vector.
See also: onbalvol, posvolidx.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the negative volume index of a security based on its closing
price (CLOS
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
nomrr
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 189
-- Function File: RETURN = nomrr (RATE, NUMPERIODS)
Compute the nominal rate of return based on a effective RATE over a
number of periods, NUMPERIODS.
See also: irr, effrr.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the nominal rate of return based on a effective RATE over a
number of pe
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
nper
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 576
-- Function File: nper (R, P, A, L, METHOD)
Return the number of regular payments of P necessary to amortize A
loan of amount A and interest R.
The optional argument L may be used to specify an additional
lump-sum payment of L made at the end of the amortization time.
The optional argument METHOD may be used to specify whether
payments are made at the end ("E", default) or at the beginning
("B") of each period.
Note that the rate R is specified as a fraction (i.e., 0.05, not 5
percent).
See also: pv, pmt, rate, npv.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the number of regular payments of P necessary to amortize A loan
of amoun
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
npv
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 574
-- Function File: npv (R, P, I)
Net present value of a series of payments.
Returns the net present value of a series of irregular (i.e., not
necessarily identical) payments P which occur at the ends of N
consecutive periods. R specifies the one-period interest rates and
can either be a scalar (constant rates) or a vector of the same
length as P.
The optional argument I may be used to specify an initial
investment.
Note that the rate R is specified as a fraction (i.e., 0.05, not 5
percent).
See also: irr, pv.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Net present value of a series of payments.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
nweekdate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 373
-- Function File: last = nweekdate (n, weekday, year, month, nextday)
Returns the Nth occurrence of WEEKDAY from the MONTH and YEAR. If
the optional NEXTDAY argument is given, then the week must also
contain NEXTDAY. If N is greater than the number of occurrences of
that day in the month, 0 is returned.
See also: eomdate, lweekdate, weekday.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Returns the Nth occurrence of WEEKDAY from the MONTH and YEAR.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
onbalvol
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 411
-- Function File: OBV = onbalvol (CLOSEPRICE, VOL)
-- Function File: OBV = onbalvol ([CLOSEPRICE VOL])
Compute the on balance volume of a security based on its closing
price (CLOSEPRICE) and VOLume. They may be given as separate
arguments or as an nx2 matrix.
The output will be a column vector, and the first number in the
output is always 0.
See also: negvolidx, posvolidx.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the on balance volume of a security based on its closing price
(CLOSEPRI
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
opprofit
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 550
-- Function File: PROFIT = opprofit (ASSETPRICE, STRIKE, COST, POSFLAG,
OPTTYPE)
Compute profit of an option.
-- Variable: ASSETPRICE The price of the underlying asset at the
expiry time.
-- Variable: STRIKE The strike price the option is written on.
-- Variable: COST The premium paid/charged for the option.
-- Variable: POSFLAG Option position. 0 = long, 1 = short.
-- Variable: OPTTYPE Option type. 0 = call option, 1 = put
option.
See also: binprice, blsprice.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Compute profit of an option.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
pmt
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 448
-- Function File: pmt (R, N, A, L, METHOD)
Return the amount of periodic payment necessary to amortize a loan
of amount a with interest rate R in N periods.
The optional argument L may be used to specify a terminal lump-sum
payment.
The optional argument METHOD may be used to specify whether
payments are made at the end ("E", default) or at the beginning
("B") of each period.
See also: pv, nper, rate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the amount of periodic payment necessary to amortize a loan of
amount a w
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
pointfig
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 231
-- Function File: pointfig (ASSET)
Plot the point figure chart of an ASSET. Upward price movements
are plotted as Xs and downward movements are plotted as Os.
See also: bolling, candle, dateaxis, highlow, movavg.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Plot the point figure chart of an ASSET.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
posvolidx
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 569
-- Function File: PVI = posvolidx (CLOSEPRICE, VOL)
-- Function File: PVI = posvolidx ([CLOSEPRICE VOL])
-- Function File: PVI = posvolidx (CLOSEPRICE, VOL, INITPVI)
-- Function File: PVI = posvolidx ([CLOSEPRICE VOL], INITPVI)
Compute the positive volume index of a security based on its
closing price (CLOSEPRICE) and VOLume. They may be given as
separate arguments or as an nx2 matrix. If given, the INITPVI is
the starting value of the pvi (default: 100).
The PVI will always be a column vector.
See also: onbalvol, negvolidx.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the positive volume index of a security based on its closing
price (CLOS
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2
pv
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 577
-- Function File: pv (R, N, P, L, METHOD)
Returns the present value of an investment that will pay off P for
N consecutive periods, assuming an interest R.
The optional argument L may be used to specify an additional
lump-sum payment made at the end of N periods.
The optional argument METHOD may be used to specify whether
payments are made at the end ('"e"', default) or at the beginning
('"b"') of each period.
Note that the rate R is specified as a fraction (i.e., 0.05, not 5
percent).
See also: pmt, nper, rate, npv.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Returns the present value of an investment that will pay off P for N
consecutive
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
pvl
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 266
-- Function File: V = pvl (R, N, P)
Return the present value V of an investment that will pay off P in
one lump sum at the end of N periods, given the interest rate R.
Note that the rate R is specified as a fraction (i.e., 0.05, not 5
percent).
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the present value V of an investment that will pay off P in one
lump sum
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
rate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 614
-- Function File: R = rate (N, P, V)
-- Function File: R = rate (N, P, V, L)
-- Function File: R = rate (N, P, V, L, METHOD)
-- Function File: R = rate (N, P, V, METHOD)
Return the rate of return R on an investment of present value V
which pays P in N consecutive periods.
The optional argument L may be used to specify an additional
lump-sum payment made at the end of N periods.
The optional string argument METHOD may be used to specify whether
payments are made at the end ('"e"', default) or at the beginning
('"b"') of each period.
See also: pv, pmt, nper, npv.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return the rate of return R on an investment of present value V which
pays P in
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
renko
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 923
-- Function File: renko (X)
-- Function File: renko (X, THRESHOLD)
Plots price changes using a Renko chart.
-- Variable: X An M-by-2 matrix in which the first column
contains datenum bers and the second contains prices.
-- Variable: THRESHOLD (Optional, default = 1.) A new box is
added only when subsequent prices change by more than the
threshold.
X = [...
730299.00 23.45; ...
730300.00 23.30; ...
730305.00 24.00; ...
730310.00 23.50; ...
730315.00 23.55; ...
730320.00 24.11; ...
730325.00 26.00; ...
730330.00 26.59; ...
730335.00 26.50; ...
730340.00 26.40; ...
730345.00 25.00];
renko(X, .1);
See also: bolling, candle, highlow, kagi, linebreak, movavg,
pointfig, priceandvol, volarea.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Plots price changes using a Renko chart.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
rsindex
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 401
-- Function File: RSI = rsindex (CLOSEPRICE)
-- Function File: RSI = rsindex (CLOSEPRICE, NPERIODS)
Compute the relative strength index (RSI) of an asset from the
vector of closing prices (CLOSEPRICE). NPERIODS defines the number
of periods that the rsi should be calculated for (default: 14).
The beginning of the RSI is padded with nans to match the size of
CLOSEPRICE.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Compute the relative strength index (RSI) of an asset from the vector of
closing
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
sdeddo
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 656
-- Function File: SDE = sdeddo (DRIFTRATE, DIFFUSIONRATE)
-- Function File: SDE = sdeddo (DRIFTRATE, DIFFUSIONRATE, OPTIONNAME,
OPTIONVALUE, ...)
Creates an object to represent a stochastic differential equation
(SDE) using drift and diffusion objects:
dX_t = DRIFTRATE(t, X_t)dt + DIFFUSIONRATE(t, X_t)dW_t.
* (X_t) is an NVARS-dimensional process;
* (W_t) is an NBROWNS-dimensional Wiener process.
-- Variable: DRIFTRATE A drift object.
-- Variable: DIFFUSIONRATE A diffusion object.
See the @sde documentation for a list of optional arguments.
See also: drift, diffusion, sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a stochastic differential equation (SDE)
using dr
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
sdeld
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 692
-- Function File: SDE = sdeld (A, B, ALPHA, SIGMA)
-- Function File: SDE = sdeld (A, B, ALPHA, SIGMA, OPTIONNAME,
OPTIONVALUE, ...)
Creates an object to represent a stochastic differential equation
(SDE) in linear drift-rate form:
dX_t = (A(t) + B(t) * X_t)dt + (diag(X_t.^ALPHA(t)) * SIGMA(t))dW_t
* (X_t) is an NVARS-dimensional process;
* (W_t) is an NBROWNS-dimensional Wiener process.
The parameters A and B appear in the @sde/drift documentation.
The parameters ALPHA and SIGMA appear in the @sde/diffusion
documentation.
See the @sde documentation for a list of optional arguments.
See also: drift, diffusion, sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a stochastic differential equation (SDE)
in linea
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
sdemrd
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1168
-- Function File: SDE = sdemrd (SPEED, LEVEL, ALPHA, SIGMA)
-- Function File: SDE = sdemrd (SPEED, LEVEL, ALPHA, SIGMA, OPTIONNAME,
OPTIONVALUE, ...)
Creates an object to represent a stochastic differential equation
(SDE) in in mean-reverting drift-rate form:
dX_t = (SPEED(t) * (LEVEL(t) - X_t))dt + (diag(X_t.^ALPHA(t)) * SIGMA(t))dW_t.
* (X_t) is an NVARS-dimensional process;
* (W_t) is an NBROWNS-dimensional Wiener process.
-- Variable: SPEED An NVARS-by-NVARS matrix or a function. As a
function, SPEED returns an NVARS-by-NVARS matrix and has
either exactly one input (time: SPEED(t)) or exactly two
inputs (time and space: SPEED(t, X_t)).
-- Variable: LEVEL An NVARS-by-1 vector or a function. As a
function, LEVEL returns an NVARS-by-1 vector and has either
exactly one input (time: LEVEL(t)) or exactly two inputs (time
and space: LEVEL(t, X_t)).
The parameters ALPHA and SIGMA appear in the @sde/diffusion
documentation.
See the @sde documentation for a list of optional arguments.
See also: drift, diffusion, sde.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates an object to represent a stochastic differential equation (SDE)
in in me
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
second
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 336
-- Function File: second (DATE)
-- Function File: second (DATE, F)
Return seconds of a date.
For a given DATE in a serial date number or date string format,
returns its seconds. The optional variable F, specifies the format
string used to interpret date strings.
See also: date, datevec, now, hour, minute.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Return seconds of a date.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
taxedrr
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 194
-- Function File: RETURN = taxedrr (PRETAXRETURN, TAXRATE)
Compute the taxed rate of RETURN based on a PRETAXRETURN rate and a
TAXRATE.
See also: irr, effrr, nomrr, pvvar, xirr.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 76
Compute the taxed rate of RETURN based on a PRETAXRETURN rate and a
TAXRATE.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
thirdwednesday
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 390
-- Function File: [begindate, enddate] = thirdwednesday (month, year)
Find the third Wednesday of the month specified by the MONTH and
YEAR. The BEGINDATE is the third Wednesday of the month, and the
ENDDATE is three months after that. Outputs are in the form of
datenums.
The third Wednesday is used for Eurodollar futures.
See also: nweekdate, datenum.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
Find the third Wednesday of the month specified by the MONTH and YEAR.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
today
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 358
-- Function File: datenum = today ()
Returns the current local date as the number of days since Jan 1,
0000. By this reckoning, Jan 1, 1970 is day number 719529.
The returned number corresponds to 00:00:00 today.
The returned value is also called a "serial date number" (see
'datenum').
See also: clock, date, datenum, now.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
Returns the current local date as the number of days since Jan 1, 0000.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
vol
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 475
-- Function File: VOLAT = vol (X, M, N)
Return the volatility VOLAT of each column of the input matrix X.
The number of data sets per period is given by M (e.g. the number
of data per year if you want to compute the volatility per year).
The optional parameter N gives the number of past periods used for
computation, if it is omitted, a value of 1 is used.
If T is the number of rows of X, 'vol' returns the volatility from
'n*m' to T.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Return the volatility VOLAT of each column of the input matrix X.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
weeknum
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1289
-- Function File: [N, Y] = weeknum (D)
-- Function File: [N, Y] = weeknum (D, W)
-- Function File: [N, Y] = weeknum (D, W, E)
Return the week number of the year of a date
D is a serial date number or datestring.
W is (optionally) the day that defines the first day of the week (1
is Sunday, 2 is Monday etc.). Default is 1 (Sunday).
E is a boolean to toggle the "European" definition that the first
week should contain at least 4 days of the new year. (And hence
always contains 4th of January). Default is 0, in which case the
first week of the year is the week that contains the first day of
the year.
Please note that when E is zero, days in a week that overlap two
years do not all return the same weeknumber.
Y will be the year in which the week falls. When e=0 (default) Y
will always be the year of the input date. When e=1, the week may
be in the next or previous year.
_Note_: In ISO8601 weeks start with Monday. The first week of a
year is the week that contains at least 4 days (and hence contains
the first Thursday of the year and also always contains the 4th of
January). So for an ISO8601 weeknumber use: 'N = weeknum (D, 2,
1)'.
See also: datenum, datestr.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Return the week number of the year of a date
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
x2mdate
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 961
-- Function File: datenums = x2mdate (exceldatenums)
-- Function File: datenums = x2mdate (exceldatenums, convention)
-- Function File: datenums = x2mdate (exceldatenums, convention,
"ExcelBug")
Convert DATENUMS from the Microsoft Excel date format to the format
used by 'datenum'. If set to 0 (default, Excel for Windows),
CONVENTION specifies to use the Excel 1900 convention where Jan 1,
1900 corresponds to Excel serial date number 1. If set to 1 (Excel
for Mac), CONVENTION specifies to use the Excel 1904 convention
where Jan 1, 1904 corresponds to Excel serial date number 0.
Note that this does not take into account the Excel bug where 1900
is considered to be a leap year unless you give the "ExcelBug"
option.
Excel does not represent dates prior to 1 January 1900 using this
format, so a warning will be issued if any dates preceed this date.
See also: datenum, x2mdate.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Convert DATENUMS from the Microsoft Excel date format to the format used
by 'dat
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
yahoo
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 408
-- Function File: CONN = yahoo ()
-- Function File: CONN = yahoo (URL, IPADDRESS, PORT)
Prepare a Yahoo connection for the fetch command to get Yahoo
historical quote data.
If given, the URL must be "http://quote.yahoo.com". The IPADDRESS
and PORT is the proxy ipaddress and port. These parameters are
currently ignored (with a warning if given).
See also: fetch, google.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Prepare a Yahoo connection for the fetch command to get Yahoo historical
quote d
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
year
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 324
-- Function File: year (DATE)
-- Function File: year (DATE, F)
Return year of a date.
For a given DATE in a serial date number or date string format,
returns its year. The optional variable F, specifies the format
string used to interpret date strings.
See also: date, datevec, now, day, month.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Return year of a date.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
yeardays
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 559
-- Function File: D = yeardays (Y)
-- Function File: D = yeardays (Y, B)
Return the number of days in the year Y with an optional basis B.
Valid bases
* 0 actual/actual (default)
* 1 30/360 (SIA)
* 2 actual/360
* 3 actual/365
* 4 30/360 (PSA)
* 5 30/360 (IDSA)
* 6 30/360 (European)
* 7 actual/365 (Japanese)
* 8 actual/actual (ISMA)
* 9 actual/360 (ISMA)
* 10 actual/365 (ISMA)
* 11 30/360E (ISMA)
See also: days365, days360, daysact, daysdif.
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Return the number of days in the year Y with an optional basis B.
|