Как рассчитать R-квадрат в Excel?

Что такое R-квадрат?

В финансовом мире R-квадрат — это статистическая мера, которая представляет процент движений фонда или ценной бумаги, которые можно объяснить движениями в контрольном индексе. Если корреляция объясняет силу взаимосвязи между независимой и зависимой переменной, R-квадрат объясняет, в какой степени дисперсия одной переменной объясняет дисперсию второй переменной. Формула для R-квадрата — это просто квадрат корреляции.

@font-face{font-family:’Roboto’;font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu72xKOzY.woff2)format(‘woff2′);unicode-range:U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}@font-face{font-family:’Roboto’;font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu5mxKOzY.woff2)format(‘woff2′);unicode-range:U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}@font-face{font-family:’Roboto’;font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7mxKOzY.woff2)format(‘woff2′);unicode-range:U+1F00-1FFF;}@font-face{font-family:’Roboto’;font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4WxKOzY.woff2)format(‘woff2′);unicode-range:U+0370-03FF;}@font-face{font-family:’Roboto’;font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7WxKOzY.woff2)format(‘woff2′);unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;}@font-face{font-family:’Roboto’;font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu7GxKOzY.woff2)format(‘woff2′);unicode-range:U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face{font-family:’Roboto’;font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2)format(‘woff2’);unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}if (document.fonts && document.fonts.load) {document.fonts.load(«400 10pt Roboto», «E»); document.fonts.load(«500 10pt Roboto», «E»);}html {overflow: hidden;}body {font: 12px Roboto, Arial, sans-serif; background-color: #000; color: #fff; height: 100%; width: 100%; overflow: hidden; position: absolute; margin: 0; padding: 0;}#player {width: 100%; height: 100%;}h1 {text-align: center; color: #fff;}h3 {margin-top: 6px; margin-bottom: 3px;}.player-unavailable {position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 25px; font-size: 13px; background: url(/img/meh7.png) 50% 65% no-repeat;}.player-unavailable.message {text-align: left; margin: 0 -5px 15px; padding: 0 5px 14px; border-bottom: 1px solid #888; font-size: 19px; font-weight: normal;}.player-unavailable a {color: #167ac6; text-decoration: none;}var ytcsi={gt:function(n){n=(n||»»)+»data_»;return ytcsi
,info:function(k,
v,n){ytcsi.gt(n).info
;
(function(w,d){ytcsi.setStart(«dhs»,w.performance?w.performance.timing.responseStart:null);var isPrerender=(d.visibilityState||d.webkitVisibilityState)==»prerender»;var vName=!d.visibilityState&&d.webkitVisibilityState?»webkitvisibilitychange»:»visibilitychange»;if(isPrerender){ytcsi.info(«prerender»,1);var startTick=function(){ytcsi.setStart(«dhs»);d.removeEventListener(vName,startTick)};d.addEventListener(vName,startTick,false)}if(d.addEventListener)d.addEventListener(vName,function(){ytcsi.tick(«vc»)},
false);function isGecko(){if(!w.navigator)return false;try{if(w.navigator.userAgentData&&w.navigator.userAgentData.brands&&w.navigator.userAgentData.brands.length){var brands=w.navigator.userAgentData.brands;for(var i=0;i0&&ua.toLowerCase().indexOf(«webkit»)<0&&ua.indexOf(«Edge»)<
0&&ua.indexOf(«Trident»)<0&&ua.indexOf(«MSIE»)<0}if(isGecko()){var isHidden=(d.visibilityState||d.webkitVisibilityState)==»hidden»;if(isHidden)ytcsi.tick(«vc»)}var slt=function(el,t){setTimeout(function(){var n=ytcsi.now();el.loadTime=n;if(el.slt)el.slt()},t)};w.__ytRIL=function(el){if(!el.getAttribute(«data-thumb»))if(w.requestAnimationFrame)w.requestAnimationFrame(function(){slt(el,0)});else slt(el,16)}})(window,document);
var ytcfg={d:function(){return window.yt&&yt.config_||ytcfg.data_||(ytcfg.data_={})},get:function(k,o){return k in ytcfg.d()?ytcfg.d()
;
ytcfg.set({«EVENT_ID»:»bMGTYIPRNcnhgQe9-omoCA»,»EXPERIMENT_FLAGS»:{«is_browser_support_for_webcam_streaming»:true,»kevlar_guide_refresh»:true,»service_worker_push_home_page_prompt»:true,»live_chat_use_punctual»:true,»polymer_bad_build_labels»:true,»disable_thumbnail_preloading»:true,»is_kevlar_wexit_main_launch»:true,»web_gel_timeout_cap»:true,»mdx_load_cast_api_bootstrap_script»:true,»web_always_load_chat_support»:true,»ytidb_stop_transaction_commit»:true,»web_dedupe_ve_grafting»:true,»log_final_payload»:true,»log_vis_on_tab_change»:true,»live_chat_use_fetch_command»:true,»polymer_verifiy_app_state»:true,»pageid_as_header_web»:true,»kevlar_dropdown_fix»:true,»nwl_use_ytidb_partitioning»:true,»service_worker_push_enabled»:true,»web_api_url»:true,»custom_csi_timeline_use_gel»:true,»desktop_sparkles_light_cta_button»:true,»enable_watch_next_pause_autoplay_lact»:true,»no_sub_count_on_sub_button»:true,»html5_unschedule_companions_with_terminated_video_ad»:true,»botguard_periodic_refresh»:true,»deprecate_pair_servlet_enabled»:true,»networkless_logging»:true,»disable_simple_mixed_direction_formatted_strings»:true,»service_worker_push_watch_page_prompt»:true,»live_chat_increased_min_height»:true,»mdx_enable_privacy_disclosure_ui»:true,»desktop_pyv_on_watch_missing_params»:true,»warm_load_nav_start_web»:true,»cancel_pending_navs»:true,»enable_mixed_direction_formatted_strings»:true,»service_worker_enabled»:true,»web_enable_ad_signals_in_it_context»:true,»use_watch_fragments2″:true,»desktop_action_companion_wta_support»:true,»suppress_error_204_logging»:true,»flush_gel»:true,»html5_check_both_ad_active_and_ad_info»:true,»live_chat_unicode_emoji_skintone_update»:true,»is_mweb_wexit_main_launch»:true,»log_web_endpoint_to_layer»:true,»mweb_csi_watch_fix»:true,»desktop_client_release»:true,»enable_nwl_cleaning_logic»:true,»web_log_connection_in_gel»:true,»enable_auto_play_param_fix_for_masthead_ad»:true,»html5_enable_video_overlay_on_inplayer_slot_for_tv»:true,»gfeedback_for_signed_out_users_enabled»:true,»kevlar_gel_error_routing»:true,»autoescape_tempdata_url»:true,»disable_child_node_auto_formatted_strings»:true,»enable_docked_chat_messages»:true,»web_log_connection»:true,»desktop_notification_high_priority_ignore_push»:true,»web_lifecycles»:true,»enable_ypc_spinners»:true,»web_yt_config_context»:true,»vss_final_ping_send_and_write»:true,»desktop_notification_set_title_bar»:true,»html5_pacf_enable_dai»:true,»ytidb_transaction_ended_event_rate_limit»:0.02,»addto_ajax_log_warning_fraction»:0.1,»web_system_health_fraction»:0.01,»log_js_exceptions_fraction»:1.0,»nwl_cleaning_rate»:0.1,»autoplay_pause_by_lact_sampling_fraction»:0.0,»nwl_latency_sampling_rate»:0.01,»log_window_onerror_fraction»:0.1,»autoplay_pause_by_lact_sec»:0,»log_web_meta_interval_ms»:0,»leader_election_lease_ttl»:10000,»web_gel_debounce_ms»:10000,»html5_experiment_id_label»:0,»check_navigator_accuracy_timeout_ms»:0,»leader_election_check_interval»:9000,»web_logging_max_batch»:100,»botguard_async_snapshot_timeout_ms»:3000,»watch_next_pause_autoplay_lact_sec»:4500,»network_polling_interval»:30000,»leader_election_renewal_interval»:6000,»desktop_polymer_video_masthead_session_tempdata_ttl»:30,»service_worker_push_logged_out_prompt_watches»:-1,»web_foreground_heartbeat_interval_ms»:28000,»ytidb_transaction_try_count»:3,»prefetch_comments_ms_after_video»:0,»service_worker_push_prompt_delay_microseconds»:3888000000000,»service_worker_push_prompt_cap»:-1,»initial_gel_batch_timeout»:2000,»service_worker_push_force_notification_prompt_tag»:»1″,»web_client_version_override»:»»,»consent_url_override»:»»,»cb_v2_uxe»:»»,»live_chat_unicode_emoji_json_url»:»https://www.gstatic.com/youtube/img/emojis/emojis-svg-7.json»,»service_worker_scope»:»/»,»kevlar_command_handler_command_banlist»:
);var yterr = yterr || true;YouTube

Investopedia

196K subscribers

Распространенные ошибки с R-Squared

Первая наиболее частая ошибка заключается в предположении, что R-квадрат, приближающийся к +/- 1, является статистически значимым. Показание, приближающееся к +/- 1, определенно увеличивает шансы на фактическую статистическую значимость, но без дальнейшего тестирования это невозможно узнать, основываясь только на результате. Статистическая проверка совсем не проста; он может усложниться по ряду причин. Чтобы коснуться этого вкратце, критическое предположение о корреляции (и, следовательно, о R-квадрате) состоит в том, что переменные независимы и что связь между ними линейна. Теоретически вы должны проверить эти утверждения, чтобы определить, подходит ли расчет корреляции.

Вторая наиболее частая ошибка — это забвение нормализовать данные в единый блок. Если вы вычисляете корреляцию (или R-квадрат) для двух бета-версий, то единицы уже нормализованы: единица измерения — бета. Однако, если вы хотите соотнести акции, очень важно нормализовать их в процентах доходности, а не в изменении цены акций. Это случается слишком часто даже среди профессионалов в области инвестиций.

Что касается корреляции прибыль за определенное количество периодов и как эта дисперсия соотносится с другой дисперсией ценных бумаг за тот же период? Две ценные бумаги могут иметь высокую корреляцию (или R-квадрат), если доходность представляет собой ежедневные процентные изменения за последние 52 недели, но низкую корреляцию, если доходность представляет собой ежемесячные изменения за последние 52 недели. Какой из них лучше»? На самом деле нет идеального ответа, и это зависит от цели теста.

Как рассчитать R-квадрат в Excel

Существует несколько методов вычисления R-квадрата в Excel.

Самый простой способ — получить два набора данных и использовать встроенную формулу R-квадрат. Другой вариант — найти корреляцию, а затем возвести ее в квадрат. Оба показаны ниже: