|
91 | 91 | }, |
92 | 92 | { |
93 | 93 | "cell_type": "code", |
94 | | - "execution_count": 2, |
| 94 | + "execution_count": 1, |
95 | 95 | "metadata": {}, |
96 | 96 | "outputs": [], |
97 | 97 | "source": [ |
|
109 | 109 | }, |
110 | 110 | { |
111 | 111 | "cell_type": "code", |
112 | | - "execution_count": 4, |
| 112 | + "execution_count": 2, |
113 | 113 | "metadata": {}, |
114 | 114 | "outputs": [ |
115 | 115 | { |
116 | 116 | "data": { |
117 | 117 | "text/plain": [ |
118 | | - "<refinitiv.data.session.Definition object at 0x7fb37336d640 {name='workspace'}>" |
| 118 | + "<refinitiv.data.session.Definition object at 0x7f84cc294460 {name='workspace'}>" |
119 | 119 | ] |
120 | 120 | }, |
121 | | - "execution_count": 4, |
| 121 | + "execution_count": 2, |
122 | 122 | "metadata": {}, |
123 | 123 | "output_type": "execute_result" |
124 | 124 | } |
|
633 | 633 | ")" |
634 | 634 | ] |
635 | 635 | }, |
| 636 | + { |
| 637 | + "cell_type": "markdown", |
| 638 | + "metadata": {}, |
| 639 | + "source": [ |
| 640 | + "### Fundamental fields history (Not recommended - Please use get_history instead)\n", |
| 641 | + "_**Important note:** get_data can be used with SDate and EDate parameters to retrieve fundamental time series. However, this practice (shown in the following two examples) is not recommended because it can cause alignment issues. This is due to the nature of get_data which was designed for retrieving current data. For time series please use get_history()._" |
| 642 | + ] |
| 643 | + }, |
| 644 | + { |
| 645 | + "cell_type": "code", |
| 646 | + "execution_count": 13, |
| 647 | + "metadata": {}, |
| 648 | + "outputs": [ |
| 649 | + { |
| 650 | + "data": { |
| 651 | + "text/html": [ |
| 652 | + "<div>\n", |
| 653 | + "<style scoped>\n", |
| 654 | + " .dataframe tbody tr th:only-of-type {\n", |
| 655 | + " vertical-align: middle;\n", |
| 656 | + " }\n", |
| 657 | + "\n", |
| 658 | + " .dataframe tbody tr th {\n", |
| 659 | + " vertical-align: top;\n", |
| 660 | + " }\n", |
| 661 | + "\n", |
| 662 | + " .dataframe thead th {\n", |
| 663 | + " text-align: right;\n", |
| 664 | + " }\n", |
| 665 | + "</style>\n", |
| 666 | + "<table border=\"1\" class=\"dataframe\">\n", |
| 667 | + " <thead>\n", |
| 668 | + " <tr style=\"text-align: right;\">\n", |
| 669 | + " <th></th>\n", |
| 670 | + " <th>Instrument</th>\n", |
| 671 | + " <th>Date</th>\n", |
| 672 | + " <th>Revenue</th>\n", |
| 673 | + " </tr>\n", |
| 674 | + " </thead>\n", |
| 675 | + " <tbody>\n", |
| 676 | + " <tr>\n", |
| 677 | + " <th>0</th>\n", |
| 678 | + " <td>LSEG.L</td>\n", |
| 679 | + " <td>2021-12-31</td>\n", |
| 680 | + " <td>6740000000</td>\n", |
| 681 | + " </tr>\n", |
| 682 | + " <tr>\n", |
| 683 | + " <th>1</th>\n", |
| 684 | + " <td>LSEG.L</td>\n", |
| 685 | + " <td>2020-12-31</td>\n", |
| 686 | + " <td>2030000000</td>\n", |
| 687 | + " </tr>\n", |
| 688 | + " <tr>\n", |
| 689 | + " <th>2</th>\n", |
| 690 | + " <td>LSEG.L</td>\n", |
| 691 | + " <td>2019-12-31</td>\n", |
| 692 | + " <td>2314000000</td>\n", |
| 693 | + " </tr>\n", |
| 694 | + " <tr>\n", |
| 695 | + " <th>3</th>\n", |
| 696 | + " <td>LSEG.L</td>\n", |
| 697 | + " <td>2018-12-31</td>\n", |
| 698 | + " <td>2135000000</td>\n", |
| 699 | + " </tr>\n", |
| 700 | + " <tr>\n", |
| 701 | + " <th>4</th>\n", |
| 702 | + " <td>VOD.L</td>\n", |
| 703 | + " <td>2022-03-31</td>\n", |
| 704 | + " <td>45580000000</td>\n", |
| 705 | + " </tr>\n", |
| 706 | + " <tr>\n", |
| 707 | + " <th>5</th>\n", |
| 708 | + " <td>VOD.L</td>\n", |
| 709 | + " <td>2021-03-31</td>\n", |
| 710 | + " <td>43809000000</td>\n", |
| 711 | + " </tr>\n", |
| 712 | + " <tr>\n", |
| 713 | + " <th>6</th>\n", |
| 714 | + " <td>VOD.L</td>\n", |
| 715 | + " <td>2020-03-31</td>\n", |
| 716 | + " <td>44974000000</td>\n", |
| 717 | + " </tr>\n", |
| 718 | + " <tr>\n", |
| 719 | + " <th>7</th>\n", |
| 720 | + " <td>VOD.L</td>\n", |
| 721 | + " <td>2019-03-31</td>\n", |
| 722 | + " <td>43666000000</td>\n", |
| 723 | + " </tr>\n", |
| 724 | + " </tbody>\n", |
| 725 | + "</table>\n", |
| 726 | + "</div>" |
| 727 | + ], |
| 728 | + "text/plain": [ |
| 729 | + " Instrument Date Revenue\n", |
| 730 | + "0 LSEG.L 2021-12-31 6740000000\n", |
| 731 | + "1 LSEG.L 2020-12-31 2030000000\n", |
| 732 | + "2 LSEG.L 2019-12-31 2314000000\n", |
| 733 | + "3 LSEG.L 2018-12-31 2135000000\n", |
| 734 | + "4 VOD.L 2022-03-31 45580000000\n", |
| 735 | + "5 VOD.L 2021-03-31 43809000000\n", |
| 736 | + "6 VOD.L 2020-03-31 44974000000\n", |
| 737 | + "7 VOD.L 2019-03-31 43666000000" |
| 738 | + ] |
| 739 | + }, |
| 740 | + "execution_count": 13, |
| 741 | + "metadata": {}, |
| 742 | + "output_type": "execute_result" |
| 743 | + } |
| 744 | + ], |
| 745 | + "source": [ |
| 746 | + "rd.get_data(\n", |
| 747 | + " universe=['LSEG.L', 'VOD.L'], \n", |
| 748 | + " fields=['TR.Revenue.date', 'TR.Revenue'],\n", |
| 749 | + " parameters = {'SDate':0, 'EDate':-3}\n", |
| 750 | + ")" |
| 751 | + ] |
| 752 | + }, |
| 753 | + { |
| 754 | + "cell_type": "code", |
| 755 | + "execution_count": 14, |
| 756 | + "metadata": {}, |
| 757 | + "outputs": [ |
| 758 | + { |
| 759 | + "data": { |
| 760 | + "text/html": [ |
| 761 | + "<div>\n", |
| 762 | + "<style scoped>\n", |
| 763 | + " .dataframe tbody tr th:only-of-type {\n", |
| 764 | + " vertical-align: middle;\n", |
| 765 | + " }\n", |
| 766 | + "\n", |
| 767 | + " .dataframe tbody tr th {\n", |
| 768 | + " vertical-align: top;\n", |
| 769 | + " }\n", |
| 770 | + "\n", |
| 771 | + " .dataframe thead th {\n", |
| 772 | + " text-align: right;\n", |
| 773 | + " }\n", |
| 774 | + "</style>\n", |
| 775 | + "<table border=\"1\" class=\"dataframe\">\n", |
| 776 | + " <thead>\n", |
| 777 | + " <tr style=\"text-align: right;\">\n", |
| 778 | + " <th></th>\n", |
| 779 | + " <th>Instrument</th>\n", |
| 780 | + " <th>Date</th>\n", |
| 781 | + " <th>Revenue</th>\n", |
| 782 | + " </tr>\n", |
| 783 | + " </thead>\n", |
| 784 | + " <tbody>\n", |
| 785 | + " <tr>\n", |
| 786 | + " <th>0</th>\n", |
| 787 | + " <td>LSEG.L</td>\n", |
| 788 | + " <td>2021-12-31</td>\n", |
| 789 | + " <td>6740000000</td>\n", |
| 790 | + " </tr>\n", |
| 791 | + " <tr>\n", |
| 792 | + " <th>1</th>\n", |
| 793 | + " <td>LSEG.L</td>\n", |
| 794 | + " <td>2020-12-31</td>\n", |
| 795 | + " <td>2030000000</td>\n", |
| 796 | + " </tr>\n", |
| 797 | + " <tr>\n", |
| 798 | + " <th>2</th>\n", |
| 799 | + " <td>LSEG.L</td>\n", |
| 800 | + " <td>2019-12-31</td>\n", |
| 801 | + " <td>2314000000</td>\n", |
| 802 | + " </tr>\n", |
| 803 | + " <tr>\n", |
| 804 | + " <th>3</th>\n", |
| 805 | + " <td>LSEG.L</td>\n", |
| 806 | + " <td>2018-12-31</td>\n", |
| 807 | + " <td>2135000000</td>\n", |
| 808 | + " </tr>\n", |
| 809 | + " <tr>\n", |
| 810 | + " <th>4</th>\n", |
| 811 | + " <td>VOD.L</td>\n", |
| 812 | + " <td>2022-03-31</td>\n", |
| 813 | + " <td>45580000000</td>\n", |
| 814 | + " </tr>\n", |
| 815 | + " <tr>\n", |
| 816 | + " <th>5</th>\n", |
| 817 | + " <td>VOD.L</td>\n", |
| 818 | + " <td>2021-03-31</td>\n", |
| 819 | + " <td>43809000000</td>\n", |
| 820 | + " </tr>\n", |
| 821 | + " <tr>\n", |
| 822 | + " <th>6</th>\n", |
| 823 | + " <td>VOD.L</td>\n", |
| 824 | + " <td>2020-03-31</td>\n", |
| 825 | + " <td>44974000000</td>\n", |
| 826 | + " </tr>\n", |
| 827 | + " <tr>\n", |
| 828 | + " <th>7</th>\n", |
| 829 | + " <td>VOD.L</td>\n", |
| 830 | + " <td>2019-03-31</td>\n", |
| 831 | + " <td>43666000000</td>\n", |
| 832 | + " </tr>\n", |
| 833 | + " </tbody>\n", |
| 834 | + "</table>\n", |
| 835 | + "</div>" |
| 836 | + ], |
| 837 | + "text/plain": [ |
| 838 | + " Instrument Date Revenue\n", |
| 839 | + "0 LSEG.L 2021-12-31 6740000000\n", |
| 840 | + "1 LSEG.L 2020-12-31 2030000000\n", |
| 841 | + "2 LSEG.L 2019-12-31 2314000000\n", |
| 842 | + "3 LSEG.L 2018-12-31 2135000000\n", |
| 843 | + "4 VOD.L 2022-03-31 45580000000\n", |
| 844 | + "5 VOD.L 2021-03-31 43809000000\n", |
| 845 | + "6 VOD.L 2020-03-31 44974000000\n", |
| 846 | + "7 VOD.L 2019-03-31 43666000000" |
| 847 | + ] |
| 848 | + }, |
| 849 | + "execution_count": 14, |
| 850 | + "metadata": {}, |
| 851 | + "output_type": "execute_result" |
| 852 | + } |
| 853 | + ], |
| 854 | + "source": [ |
| 855 | + "rd.get_data(\n", |
| 856 | + " universe=['LSEG.L', 'VOD.L'], \n", |
| 857 | + " fields=['TR.Revenue(SDate=0, EDate=-3).date', 'TR.Revenue(SDate=0, EDate=-3)']\n", |
| 858 | + ")" |
| 859 | + ] |
| 860 | + }, |
636 | 861 | { |
637 | 862 | "cell_type": "markdown", |
638 | 863 | "metadata": {}, |
|
0 commit comments