File size: 50,484 Bytes
203c118 |
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 |
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
from typing import Literal, Optional, Union
from openbb_core.app.model.field import OpenBBField
from openbb_core.app.model.obbject import OBBject
from openbb_core.app.static.container import Container
from openbb_core.app.static.utils.decorators import exception_handler, validate
from openbb_core.app.static.utils.filters import filter_inputs
from typing_extensions import Annotated
class ROUTER_equity_estimates(Container):
"""/equity/estimates
analyst_search
consensus
forward_ebitda
forward_eps
forward_pe
forward_sales
historical
price_target
"""
def __repr__(self) -> str:
return self.__doc__ or ""
@exception_handler
@validate
def analyst_search(
self,
analyst_name: Annotated[
Union[str, None, list[Optional[str]]],
OpenBBField(
description="Analyst names to return. Omitting will return all available analysts. Multiple comma separated items allowed for provider(s): benzinga."
),
] = None,
firm_name: Annotated[
Union[str, None, list[Optional[str]]],
OpenBBField(
description="Firm names to return. Omitting will return all available firms. Multiple comma separated items allowed for provider(s): benzinga."
),
] = None,
provider: Annotated[
Optional[Literal["benzinga"]],
OpenBBField(
description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga."
),
] = None,
**kwargs
) -> OBBject:
"""Search for specific analysts and get their forecast track record.
Parameters
----------
provider : str
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga.
analyst_name : Union[str, None, list[Optional[str]]]
Analyst names to return. Omitting will return all available analysts. Multiple comma separated items allowed for provider(s): benzinga.
firm_name : Union[str, None, list[Optional[str]]]
Firm names to return. Omitting will return all available firms. Multiple comma separated items allowed for provider(s): benzinga.
analyst_ids : Optional[str]
list of analyst IDs to return. Multiple comma separated items allowed. (provider: benzinga)
firm_ids : Optional[str]
Firm IDs to return. Multiple comma separated items allowed. (provider: benzinga)
limit : Optional[int]
Number of results returned. Limit 1000. (provider: benzinga)
page : Optional[int]
Page offset. For optimization, performance and technical reasons, page offsets are limited from 0 - 100000. Limit the query results by other parameters such as date. (provider: benzinga)
fields : Optional[str]
Fields to include in the response. See https://docs.benzinga.io/benzinga-apis/calendar/get-ratings to learn about the available fields. Multiple comma separated items allowed. (provider: benzinga)
Returns
-------
OBBject
results : list[AnalystSearch]
Serializable results.
provider : Optional[str]
Provider name.
warnings : Optional[list[Warning_]]
list of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
AnalystSearch
-------------
last_updated : Optional[datetime]
Date of the last update.
firm_name : Optional[str]
Firm name of the analyst.
name_first : Optional[str]
Analyst first name.
name_last : Optional[str]
Analyst last name.
name_full : str
Analyst full name.
analyst_id : Optional[str]
ID of the analyst. (provider: benzinga)
firm_id : Optional[str]
ID of the analyst firm. (provider: benzinga)
smart_score : Optional[float]
A weighted average of the total_ratings_percentile, overall_avg_return_percentile, and overall_success_rate (provider: benzinga)
overall_success_rate : Optional[float]
The percentage (normalized) of gain/loss ratings that resulted in a gain overall. (provider: benzinga)
overall_avg_return_percentile : Optional[float]
The percentile (normalized) of this analyst's overall average return per rating in comparison to other analysts' overall average returns per rating. (provider: benzinga)
total_ratings_percentile : Optional[float]
The percentile (normalized) of this analyst's total number of ratings in comparison to the total number of ratings published by all other analysts (provider: benzinga)
total_ratings : Optional[int]
Number of recommendations made by this analyst. (provider: benzinga)
overall_gain_count : Optional[int]
The number of ratings that have gained value since the date of recommendation (provider: benzinga)
overall_loss_count : Optional[int]
The number of ratings that have lost value since the date of recommendation (provider: benzinga)
overall_average_return : Optional[float]
The average percent (normalized) price difference per rating since the date of recommendation (provider: benzinga)
overall_std_dev : Optional[float]
The standard deviation in percent (normalized) price difference in the analyst's ratings since the date of recommendation (provider: benzinga)
gain_count_1m : Optional[int]
The number of ratings that have gained value over the last month (provider: benzinga)
loss_count_1m : Optional[int]
The number of ratings that have lost value over the last month (provider: benzinga)
average_return_1m : Optional[float]
The average percent (normalized) price difference per rating over the last month (provider: benzinga)
std_dev_1m : Optional[float]
The standard deviation in percent (normalized) price difference in the analyst's ratings over the last month (provider: benzinga)
smart_score_1m : Optional[float]
A weighted average smart score over the last month. (provider: benzinga)
success_rate_1m : Optional[float]
The percentage (normalized) of gain/loss ratings that resulted in a gain over the last month (provider: benzinga)
gain_count_3m : Optional[int]
The number of ratings that have gained value over the last 3 months (provider: benzinga)
loss_count_3m : Optional[int]
The number of ratings that have lost value over the last 3 months (provider: benzinga)
average_return_3m : Optional[float]
The average percent (normalized) price difference per rating over the last 3 months (provider: benzinga)
std_dev_3m : Optional[float]
The standard deviation in percent (normalized) price difference in the analyst's ratings over the last 3 months (provider: benzinga)
smart_score_3m : Optional[float]
A weighted average smart score over the last 3 months. (provider: benzinga)
success_rate_3m : Optional[float]
The percentage (normalized) of gain/loss ratings that resulted in a gain over the last 3 months (provider: benzinga)
gain_count_6m : Optional[int]
The number of ratings that have gained value over the last 6 months (provider: benzinga)
loss_count_6m : Optional[int]
The number of ratings that have lost value over the last 6 months (provider: benzinga)
average_return_6m : Optional[float]
The average percent (normalized) price difference per rating over the last 6 months (provider: benzinga)
std_dev_6m : Optional[float]
The standard deviation in percent (normalized) price difference in the analyst's ratings over the last 6 months (provider: benzinga)
gain_count_9m : Optional[int]
The number of ratings that have gained value over the last 9 months (provider: benzinga)
loss_count_9m : Optional[int]
The number of ratings that have lost value over the last 9 months (provider: benzinga)
average_return_9m : Optional[float]
The average percent (normalized) price difference per rating over the last 9 months (provider: benzinga)
std_dev_9m : Optional[float]
The standard deviation in percent (normalized) price difference in the analyst's ratings over the last 9 months (provider: benzinga)
smart_score_9m : Optional[float]
A weighted average smart score over the last 9 months. (provider: benzinga)
success_rate_9m : Optional[float]
The percentage (normalized) of gain/loss ratings that resulted in a gain over the last 9 months (provider: benzinga)
gain_count_1y : Optional[int]
The number of ratings that have gained value over the last 1 year (provider: benzinga)
loss_count_1y : Optional[int]
The number of ratings that have lost value over the last 1 year (provider: benzinga)
average_return_1y : Optional[float]
The average percent (normalized) price difference per rating over the last 1 year (provider: benzinga)
std_dev_1y : Optional[float]
The standard deviation in percent (normalized) price difference in the analyst's ratings over the last 1 year (provider: benzinga)
smart_score_1y : Optional[float]
A weighted average smart score over the last 1 year. (provider: benzinga)
success_rate_1y : Optional[float]
The percentage (normalized) of gain/loss ratings that resulted in a gain over the last 1 year (provider: benzinga)
gain_count_2y : Optional[int]
The number of ratings that have gained value over the last 2 years (provider: benzinga)
loss_count_2y : Optional[int]
The number of ratings that have lost value over the last 2 years (provider: benzinga)
average_return_2y : Optional[float]
The average percent (normalized) price difference per rating over the last 2 years (provider: benzinga)
std_dev_2y : Optional[float]
The standard deviation in percent (normalized) price difference in the analyst's ratings over the last 2 years (provider: benzinga)
smart_score_2y : Optional[float]
A weighted average smart score over the last 3 years. (provider: benzinga)
success_rate_2y : Optional[float]
The percentage (normalized) of gain/loss ratings that resulted in a gain over the last 2 years (provider: benzinga)
gain_count_3y : Optional[int]
The number of ratings that have gained value over the last 3 years (provider: benzinga)
loss_count_3y : Optional[int]
The number of ratings that have lost value over the last 3 years (provider: benzinga)
average_return_3y : Optional[float]
The average percent (normalized) price difference per rating over the last 3 years (provider: benzinga)
std_dev_3y : Optional[float]
The standard deviation in percent (normalized) price difference in the analyst's ratings over the last 3 years (provider: benzinga)
smart_score_3y : Optional[float]
A weighted average smart score over the last 3 years. (provider: benzinga)
success_rate_3y : Optional[float]
The percentage (normalized) of gain/loss ratings that resulted in a gain over the last 3 years (provider: benzinga)
Examples
--------
>>> from openbb import obb
>>> obb.equity.estimates.analyst_search(provider='benzinga')
>>> obb.equity.estimates.analyst_search(firm_name='Wedbush', provider='benzinga')
""" # noqa: E501
return self._run(
"/equity/estimates/analyst_search",
**filter_inputs(
provider_choices={
"provider": self._get_provider(
provider,
"equity.estimates.analyst_search",
("benzinga",),
)
},
standard_params={
"analyst_name": analyst_name,
"firm_name": firm_name,
},
extra_params=kwargs,
info={
"analyst_name": {
"benzinga": {"multiple_items_allowed": True, "choices": None}
},
"firm_name": {
"benzinga": {"multiple_items_allowed": True, "choices": None}
},
"analyst_ids": {
"benzinga": {"multiple_items_allowed": True, "choices": None}
},
"firm_ids": {
"benzinga": {"multiple_items_allowed": True, "choices": None}
},
"fields": {
"benzinga": {"multiple_items_allowed": True, "choices": None}
},
},
)
)
@exception_handler
@validate
def consensus(
self,
symbol: Annotated[
Union[str, None, list[Optional[str]]],
OpenBBField(
description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance."
),
] = None,
provider: Annotated[
Optional[Literal["fmp", "intrinio", "yfinance"]],
OpenBBField(
description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance."
),
] = None,
**kwargs
) -> OBBject:
"""Get consensus price target and recommendation.
Parameters
----------
provider : str
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.
symbol : Union[str, None, list[Optional[str]]]
Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance.
industry_group_number : Optional[int]
The Zacks industry group number. (provider: intrinio)
Returns
-------
OBBject
results : list[PriceTargetConsensus]
Serializable results.
provider : Optional[str]
Provider name.
warnings : Optional[list[Warning_]]
list of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
PriceTargetConsensus
--------------------
symbol : str
Symbol representing the entity requested in the data.
name : Optional[str]
The company name
target_high : Optional[float]
High target of the price target consensus.
target_low : Optional[float]
Low target of the price target consensus.
target_consensus : Optional[float]
Consensus target of the price target consensus.
target_median : Optional[float]
Median target of the price target consensus.
standard_deviation : Optional[float]
The standard deviation of target price estimates. (provider: intrinio)
total_anaylsts : Optional[int]
The total number of target price estimates in consensus. (provider: intrinio)
raised : Optional[int]
The number of analysts that have raised their target price estimates. (provider: intrinio)
lowered : Optional[int]
The number of analysts that have lowered their target price estimates. (provider: intrinio)
most_recent_date : Optional[date]
The date of the most recent estimate. (provider: intrinio)
industry_group_number : Optional[int]
The Zacks industry group number. (provider: intrinio)
recommendation : Optional[str]
Recommendation - buy, sell, etc. (provider: yfinance)
recommendation_mean : Optional[float]
Mean recommendation score where 1 is strong buy and 5 is strong sell. (provider: yfinance)
number_of_analysts : Optional[int]
Number of analysts providing opinions. (provider: yfinance)
current_price : Optional[float]
Current price of the stock. (provider: yfinance)
currency : Optional[str]
Currency the stock is priced in. (provider: yfinance)
Examples
--------
>>> from openbb import obb
>>> obb.equity.estimates.consensus(symbol='AAPL', provider='fmp')
>>> obb.equity.estimates.consensus(symbol='AAPL,MSFT', provider='yfinance')
""" # noqa: E501
return self._run(
"/equity/estimates/consensus",
**filter_inputs(
provider_choices={
"provider": self._get_provider(
provider,
"equity.estimates.consensus",
("fmp", "intrinio", "yfinance"),
)
},
standard_params={
"symbol": symbol,
},
extra_params=kwargs,
info={
"symbol": {
"fmp": {"multiple_items_allowed": True, "choices": None},
"intrinio": {"multiple_items_allowed": True, "choices": None},
"yfinance": {"multiple_items_allowed": True, "choices": None},
}
},
)
)
@exception_handler
@validate
def forward_ebitda(
self,
symbol: Annotated[
Union[str, None, list[Optional[str]]],
OpenBBField(
description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio."
),
] = None,
provider: Annotated[
Optional[Literal["fmp", "intrinio"]],
OpenBBField(
description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio."
),
] = None,
**kwargs
) -> OBBject:
"""Get forward EBITDA estimates.
Parameters
----------
provider : str
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.
symbol : Union[str, None, list[Optional[str]]]
Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio.
fiscal_period : Optional[Literal['annual', 'quarter']]
The future fiscal period to retrieve estimates for. (provider: fmp)
limit : Optional[int]
The number of data entries to return. (provider: fmp)
include_historical : bool
If True, the data will include all past data and the limit will be ignored. (provider: fmp)
estimate_type : Optional[Literal['ebitda', 'ebit', 'enterprise_value', 'cash_flow_per_share', 'pretax_income']]
Limit the EBITDA estimates to this type. (provider: intrinio)
Returns
-------
OBBject
results : list[ForwardEbitdaEstimates]
Serializable results.
provider : Optional[str]
Provider name.
warnings : Optional[list[Warning_]]
list of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
ForwardEbitdaEstimates
----------------------
symbol : str
Symbol representing the entity requested in the data.
name : Optional[str]
Name of the entity.
last_updated : Optional[date]
The date of the last update.
period_ending : Optional[date]
The end date of the reporting period.
fiscal_year : Optional[int]
Fiscal year for the estimate.
fiscal_period : Optional[str]
Fiscal quarter for the estimate.
calendar_year : Optional[int]
Calendar year for the estimate.
calendar_period : Optional[Union[int, str]]
Calendar quarter for the estimate.
low_estimate : Optional[int]
The EBITDA estimate low for the period.
high_estimate : Optional[int]
The EBITDA estimate high for the period.
mean : Optional[int]
The EBITDA estimate mean for the period.
median : Optional[int]
The EBITDA estimate median for the period.
standard_deviation : Optional[int]
The EBITDA estimate standard deviation for the period.
number_of_analysts : Optional[int]
Number of analysts providing estimates for the period.
conensus_type : Optional[Literal['ebitda', 'ebit', 'enterprise_value', 'cash_flow_per_share', 'pretax_income']]
The type of estimate. (provider: intrinio)
Examples
--------
>>> from openbb import obb
>>> obb.equity.estimates.forward_ebitda(provider='intrinio')
>>> obb.equity.estimates.forward_ebitda(symbol='AAPL', fiscal_period='annual', provider='intrinio')
>>> obb.equity.estimates.forward_ebitda(symbol='AAPL,MSFT', fiscal_period='quarter', provider='fmp')
""" # noqa: E501
return self._run(
"/equity/estimates/forward_ebitda",
**filter_inputs(
provider_choices={
"provider": self._get_provider(
provider,
"equity.estimates.forward_ebitda",
("fmp", "intrinio"),
)
},
standard_params={
"symbol": symbol,
},
extra_params=kwargs,
info={
"symbol": {
"fmp": {"multiple_items_allowed": True, "choices": None},
"intrinio": {"multiple_items_allowed": True, "choices": None},
}
},
)
)
@exception_handler
@validate
def forward_eps(
self,
symbol: Annotated[
Union[str, None, list[Optional[str]]],
OpenBBField(
description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio."
),
] = None,
provider: Annotated[
Optional[Literal["fmp", "intrinio"]],
OpenBBField(
description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio."
),
] = None,
**kwargs
) -> OBBject:
"""Get forward EPS estimates.
Parameters
----------
provider : str
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.
symbol : Union[str, None, list[Optional[str]]]
Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio.
fiscal_period : str
The future fiscal period to retrieve estimates for. (provider: fmp, intrinio)
Choices for fmp: 'annual', 'quarter'
limit : Optional[int]
The number of data entries to return. (provider: fmp)
include_historical : bool
If True, the data will include all past data and the limit will be ignored. (provider: fmp)
fiscal_year : Optional[int]
The future fiscal year to retrieve estimates for. When no symbol and year is supplied the current calendar year is used. (provider: intrinio)
calendar_year : Optional[int]
The future calendar year to retrieve estimates for. When no symbol and year is supplied the current calendar year is used. (provider: intrinio)
calendar_period : Optional[Literal['q1', 'q2', 'q3', 'q4']]
The future calendar period to retrieve estimates for. (provider: intrinio)
Returns
-------
OBBject
results : list[ForwardEpsEstimates]
Serializable results.
provider : Optional[str]
Provider name.
warnings : Optional[list[Warning_]]
list of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
ForwardEpsEstimates
-------------------
symbol : str
Symbol representing the entity requested in the data.
name : Optional[str]
Name of the entity.
date : date
The date of the data.
fiscal_year : Optional[int]
Fiscal year for the estimate.
fiscal_period : Optional[str]
Fiscal quarter for the estimate.
calendar_year : Optional[int]
Calendar year for the estimate.
calendar_period : Optional[str]
Calendar quarter for the estimate.
low_estimate : Optional[float]
Estimated EPS low for the period.
high_estimate : Optional[float]
Estimated EPS high for the period.
mean : Optional[float]
Estimated EPS mean for the period.
median : Optional[float]
Estimated EPS median for the period.
standard_deviation : Optional[float]
Estimated EPS standard deviation for the period.
number_of_analysts : Optional[int]
Number of analysts providing estimates for the period.
revisions_change_percent : Optional[float]
The earnings per share (EPS) percent change in estimate for the period. (provider: intrinio)
mean_1w : Optional[float]
The mean estimate for the period one week ago. (provider: intrinio)
mean_1m : Optional[float]
The mean estimate for the period one month ago. (provider: intrinio)
mean_2m : Optional[float]
The mean estimate for the period two months ago. (provider: intrinio)
mean_3m : Optional[float]
The mean estimate for the period three months ago. (provider: intrinio)
Examples
--------
>>> from openbb import obb
>>> obb.equity.estimates.forward_eps(symbol='AAPL', provider='intrinio')
>>> obb.equity.estimates.forward_eps(fiscal_year=2025, fiscal_period='fy', provider='intrinio')
""" # noqa: E501
return self._run(
"/equity/estimates/forward_eps",
**filter_inputs(
provider_choices={
"provider": self._get_provider(
provider,
"equity.estimates.forward_eps",
("fmp", "intrinio"),
)
},
standard_params={
"symbol": symbol,
},
extra_params=kwargs,
info={
"symbol": {
"fmp": {"multiple_items_allowed": True, "choices": None},
"intrinio": {"multiple_items_allowed": True, "choices": None},
}
},
)
)
@exception_handler
@validate
def forward_pe(
self,
symbol: Annotated[
Union[str, None, list[Optional[str]]],
OpenBBField(
description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio."
),
] = None,
provider: Annotated[
Optional[Literal["intrinio"]],
OpenBBField(
description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio."
),
] = None,
**kwargs
) -> OBBject:
"""Get forward PE estimates.
Parameters
----------
provider : str
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.
symbol : Union[str, None, list[Optional[str]]]
Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio.
Returns
-------
OBBject
results : list[ForwardPeEstimates]
Serializable results.
provider : Optional[str]
Provider name.
warnings : Optional[list[Warning_]]
list of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
ForwardPeEstimates
------------------
symbol : str
Symbol representing the entity requested in the data.
name : Optional[str]
Name of the entity.
year1 : Optional[float]
Estimated PE ratio for the next fiscal year.
year2 : Optional[float]
Estimated PE ratio two fiscal years from now.
year3 : Optional[float]
Estimated PE ratio three fiscal years from now.
year4 : Optional[float]
Estimated PE ratio four fiscal years from now.
year5 : Optional[float]
Estimated PE ratio five fiscal years from now.
peg_ratio_year1 : Optional[float]
Estimated Forward PEG ratio for the next fiscal year. (provider: intrinio)
eps_ttm : Optional[float]
The latest trailing twelve months earnings per share. (provider: intrinio)
last_updated : Optional[date]
The date the data was last updated. (provider: intrinio)
Examples
--------
>>> from openbb import obb
>>> obb.equity.estimates.forward_pe(provider='intrinio')
>>> obb.equity.estimates.forward_pe(symbol='AAPL,MSFT,GOOG', provider='intrinio')
""" # noqa: E501
return self._run(
"/equity/estimates/forward_pe",
**filter_inputs(
provider_choices={
"provider": self._get_provider(
provider,
"equity.estimates.forward_pe",
("intrinio",),
)
},
standard_params={
"symbol": symbol,
},
extra_params=kwargs,
info={
"symbol": {
"intrinio": {"multiple_items_allowed": True, "choices": None}
}
},
)
)
@exception_handler
@validate
def forward_sales(
self,
symbol: Annotated[
Union[str, None, list[Optional[str]]],
OpenBBField(
description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio."
),
] = None,
provider: Annotated[
Optional[Literal["intrinio"]],
OpenBBField(
description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio."
),
] = None,
**kwargs
) -> OBBject:
"""Get forward sales estimates.
Parameters
----------
provider : str
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.
symbol : Union[str, None, list[Optional[str]]]
Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio.
fiscal_year : Optional[int]
The future fiscal year to retrieve estimates for. When no symbol and year is supplied the current calendar year is used. (provider: intrinio)
fiscal_period : Optional[Literal['fy', 'q1', 'q2', 'q3', 'q4']]
The future fiscal period to retrieve estimates for. (provider: intrinio)
calendar_year : Optional[int]
The future calendar year to retrieve estimates for. When no symbol and year is supplied the current calendar year is used. (provider: intrinio)
calendar_period : Optional[Literal['q1', 'q2', 'q3', 'q4']]
The future calendar period to retrieve estimates for. (provider: intrinio)
Returns
-------
OBBject
results : list[ForwardSalesEstimates]
Serializable results.
provider : Optional[str]
Provider name.
warnings : Optional[list[Warning_]]
list of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
ForwardSalesEstimates
---------------------
symbol : str
Symbol representing the entity requested in the data.
name : Optional[str]
Name of the entity.
date : date
The date of the data.
fiscal_year : Optional[int]
Fiscal year for the estimate.
fiscal_period : Optional[str]
Fiscal quarter for the estimate.
calendar_year : Optional[int]
Calendar year for the estimate.
calendar_period : Optional[str]
Calendar quarter for the estimate.
low_estimate : Optional[int]
The sales estimate low for the period.
high_estimate : Optional[int]
The sales estimate high for the period.
mean : Optional[int]
The sales estimate mean for the period.
median : Optional[int]
The sales estimate median for the period.
standard_deviation : Optional[int]
The sales estimate standard deviation for the period.
number_of_analysts : Optional[int]
Number of analysts providing estimates for the period.
revisions_1w_up : Optional[int]
Number of revisions up in the last week. (provider: intrinio)
revisions_1w_down : Optional[int]
Number of revisions down in the last week. (provider: intrinio)
revisions_1w_change_percent : Optional[float]
The analyst revisions percent change in estimate for the period of 1 week. (provider: intrinio)
revisions_1m_up : Optional[int]
Number of revisions up in the last month. (provider: intrinio)
revisions_1m_down : Optional[int]
Number of revisions down in the last month. (provider: intrinio)
revisions_1m_change_percent : Optional[float]
The analyst revisions percent change in estimate for the period of 1 month. (provider: intrinio)
revisions_3m_up : Optional[int]
Number of revisions up in the last 3 months. (provider: intrinio)
revisions_3m_down : Optional[int]
Number of revisions down in the last 3 months. (provider: intrinio)
revisions_3m_change_percent : Optional[float]
The analyst revisions percent change in estimate for the period of 3 months. (provider: intrinio)
Examples
--------
>>> from openbb import obb
>>> obb.equity.estimates.forward_sales(symbol='AAPL', provider='intrinio')
>>> obb.equity.estimates.forward_sales(fiscal_year=2025, fiscal_period='fy', provider='intrinio')
""" # noqa: E501
return self._run(
"/equity/estimates/forward_sales",
**filter_inputs(
provider_choices={
"provider": self._get_provider(
provider,
"equity.estimates.forward_sales",
("intrinio",),
)
},
standard_params={
"symbol": symbol,
},
extra_params=kwargs,
info={
"symbol": {
"intrinio": {"multiple_items_allowed": True, "choices": None}
}
},
)
)
@exception_handler
@validate
def historical(
self,
symbol: Annotated[
Union[str, list[str]],
OpenBBField(
description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp."
),
],
provider: Annotated[
Optional[Literal["fmp"]],
OpenBBField(
description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp."
),
] = None,
**kwargs
) -> OBBject:
"""Get historical analyst estimates for earnings and revenue.
Parameters
----------
provider : str
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.
symbol : Union[str, list[str]]
Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp.
period : Literal['quarter', 'annual']
Time period of the data to return. (provider: fmp)
limit : Optional[int]
The number of data entries to return. (provider: fmp)
Returns
-------
OBBject
results : list[AnalystEstimates]
Serializable results.
provider : Optional[str]
Provider name.
warnings : Optional[list[Warning_]]
list of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
AnalystEstimates
----------------
symbol : str
Symbol representing the entity requested in the data.
date : date
The date of the data.
estimated_revenue_low : Optional[int]
Estimated revenue low.
estimated_revenue_high : Optional[int]
Estimated revenue high.
estimated_revenue_avg : Optional[int]
Estimated revenue average.
estimated_sga_expense_low : Optional[int]
Estimated SGA expense low.
estimated_sga_expense_high : Optional[int]
Estimated SGA expense high.
estimated_sga_expense_avg : Optional[int]
Estimated SGA expense average.
estimated_ebitda_low : Optional[int]
Estimated EBITDA low.
estimated_ebitda_high : Optional[int]
Estimated EBITDA high.
estimated_ebitda_avg : Optional[int]
Estimated EBITDA average.
estimated_ebit_low : Optional[int]
Estimated EBIT low.
estimated_ebit_high : Optional[int]
Estimated EBIT high.
estimated_ebit_avg : Optional[int]
Estimated EBIT average.
estimated_net_income_low : Optional[int]
Estimated net income low.
estimated_net_income_high : Optional[int]
Estimated net income high.
estimated_net_income_avg : Optional[int]
Estimated net income average.
estimated_eps_avg : Optional[float]
Estimated EPS average.
estimated_eps_high : Optional[float]
Estimated EPS high.
estimated_eps_low : Optional[float]
Estimated EPS low.
number_analyst_estimated_revenue : Optional[int]
Number of analysts who estimated revenue.
number_analysts_estimated_eps : Optional[int]
Number of analysts who estimated EPS.
Examples
--------
>>> from openbb import obb
>>> obb.equity.estimates.historical(symbol='AAPL', provider='fmp')
""" # noqa: E501
return self._run(
"/equity/estimates/historical",
**filter_inputs(
provider_choices={
"provider": self._get_provider(
provider,
"equity.estimates.historical",
("fmp",),
)
},
standard_params={
"symbol": symbol,
},
extra_params=kwargs,
info={
"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}
},
)
)
@exception_handler
@validate
def price_target(
self,
symbol: Annotated[
Union[str, None, list[Optional[str]]],
OpenBBField(
description="Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp."
),
] = None,
limit: Annotated[
int, OpenBBField(description="The number of data entries to return.")
] = 200,
provider: Annotated[
Optional[Literal["benzinga", "fmp"]],
OpenBBField(
description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp."
),
] = None,
**kwargs
) -> OBBject:
"""Get analyst price targets by company.
Parameters
----------
provider : str
The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp.
symbol : Union[str, None, list[Optional[str]]]
Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp.
limit : int
The number of data entries to return.
page : Optional[int]
Page offset. For optimization, performance and technical reasons, page offsets are limited from 0 - 100000. Limit the query results by other parameters such as date. Used in conjunction with the limit and date parameters. (provider: benzinga)
date : Optional[date]
Date for calendar data, shorthand for date_from and date_to. (provider: benzinga)
start_date : Optional[date]
Start date of the data, in YYYY-MM-DD format. (provider: benzinga)
end_date : Optional[date]
End date of the data, in YYYY-MM-DD format. (provider: benzinga)
updated : Union[date, int, None]
Records last Updated Unix timestamp (UTC). This will force the sort order to be Greater Than or Equal to the timestamp indicated. The date can be a date string or a Unix timestamp. The date string must be in the format of YYYY-MM-DD. (provider: benzinga)
importance : Optional[int]
Importance level to filter by. Uses Greater Than or Equal To the importance indicated (provider: benzinga)
action : Optional[Literal['downgrades', 'maintains', 'reinstates', 'reiterates', 'upgrades', 'assumes', 'initiates', 'terminates', 'removes', 'suspends', 'firm_dissolved']]
Filter by a specific action_company. (provider: benzinga)
analyst_ids : Union[str, list[str], None]
Comma-separated list of analyst (person) IDs. Omitting will bring back all available analysts. Multiple comma separated items allowed. (provider: benzinga)
firm_ids : Union[str, list[str], None]
Comma-separated list of firm IDs. Multiple comma separated items allowed. (provider: benzinga)
fields : Union[str, list[str], None]
Comma-separated list of fields to include in the response. See https://docs.benzinga.io/benzinga-apis/calendar/get-ratings to learn about the available fields. Multiple comma separated items allowed. (provider: benzinga)
with_grade : bool
Include upgrades and downgrades in the response. (provider: fmp)
Returns
-------
OBBject
results : list[PriceTarget]
Serializable results.
provider : Optional[str]
Provider name.
warnings : Optional[list[Warning_]]
list of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
PriceTarget
-----------
published_date : Union[date, datetime]
Published date of the price target.
published_time : Optional[datetime.time]
Time of the original rating, UTC.
symbol : str
Symbol representing the entity requested in the data.
exchange : Optional[str]
Exchange where the company is traded.
company_name : Optional[str]
Name of company that is the subject of rating.
analyst_name : Optional[str]
Analyst name.
analyst_firm : Optional[str]
Name of the analyst firm that published the price target.
currency : Optional[str]
Currency the data is denominated in.
price_target : Optional[float]
The current price target.
adj_price_target : Optional[float]
Adjusted price target for splits and stock dividends.
price_target_previous : Optional[float]
Previous price target.
previous_adj_price_target : Optional[float]
Previous adjusted price target.
price_when_posted : Optional[float]
Price when posted.
rating_current : Optional[str]
The analyst's rating for the company.
rating_previous : Optional[str]
Previous analyst rating for the company.
action : Optional[str]
Description of the change in rating from firm's last rating.
action_change : Optional[Literal['Announces', 'Maintains', 'Lowers', 'Raises', 'Removes', 'Adjusts']]
Description of the change in price target from firm's last price target. (provider: benzinga)
importance : Optional[Literal[0, 1, 2, 3, 4, 5]]
Subjective Basis of How Important Event is to Market. 5 = High (provider: benzinga)
notes : Optional[str]
Notes of the price target. (provider: benzinga)
analyst_id : Optional[str]
Id of the analyst. (provider: benzinga)
url_news : Optional[str]
URL for analyst ratings news articles for this ticker on Benzinga.com. (provider: benzinga)
url_analyst : Optional[str]
URL for analyst ratings page for this ticker on Benzinga.com. (provider: benzinga)
id : Optional[str]
Unique ID of this entry. (provider: benzinga)
last_updated : Optional[datetime]
Last updated timestamp, UTC. (provider: benzinga)
news_url : Optional[str]
News URL of the price target. (provider: fmp)
news_title : Optional[str]
News title of the price target. (provider: fmp)
news_publisher : Optional[str]
News publisher of the price target. (provider: fmp)
news_base_url : Optional[str]
News base URL of the price target. (provider: fmp)
Examples
--------
>>> from openbb import obb
>>> obb.equity.estimates.price_target(provider='benzinga')
>>> # Get price targets for Microsoft using 'benzinga' as provider.
>>> obb.equity.estimates.price_target(start_date='2020-01-01', end_date='2024-02-16', limit=10, symbol='msft', provider='benzinga', action='downgrades')
""" # noqa: E501
return self._run(
"/equity/estimates/price_target",
**filter_inputs(
provider_choices={
"provider": self._get_provider(
provider,
"equity.estimates.price_target",
("benzinga", "fmp"),
)
},
standard_params={
"symbol": symbol,
"limit": limit,
},
extra_params=kwargs,
info={
"symbol": {
"benzinga": {"multiple_items_allowed": True, "choices": None},
"fmp": {"multiple_items_allowed": True, "choices": None},
},
"action": {
"benzinga": {
"multiple_items_allowed": False,
"choices": [
"downgrades",
"maintains",
"reinstates",
"reiterates",
"upgrades",
"assumes",
"initiates",
"terminates",
"removes",
"suspends",
"firm_dissolved",
],
}
},
"analyst_ids": {
"benzinga": {"multiple_items_allowed": True, "choices": None}
},
"firm_ids": {
"benzinga": {"multiple_items_allowed": True, "choices": None}
},
"fields": {
"benzinga": {"multiple_items_allowed": True, "choices": None}
},
},
)
)
|