交易百科

相关系数(Correlation Coefficient)

什么是相关系数(Correlation Coefficient)?

相关系数是两个变量相对运动之间关系强度的统计量度。值的范围是-1.0至1.0。计算出的数字大于1.0或小于-1.0表示相关性测量中存在错误。相关系数为-1.0表示完全负相关,而相关系数1.0表示完全正相关。0.0的相关性表明两个变量的运动之间没有线性关系。

相关统计可以用于金融和投资。例如,可以计算相关系数以确定上证指数与单个股票(例如浦发银行)的股价之间的相关程度。由于浦发银行随着油价上涨而获得更大的利润,因此两个变量之间的相关性是高度正相关的。



了解相关系数
相关系数有几种类型,但是最常见的一种是Pearson相关(r)。这测量了两个变量之间线性关系的强度和方向。它不能捕获两个变量之间的非线性关系,也不能区分因变量和自变量。

精确地为1.0的值表示两个变量之间存在完美的正关系。对于一个变量的正增加,第二个变量也有正增加。值-1.0表示两个变量之间存在完美的负相关关系。这表明变量沿相反的方向移动-一个变量的正数增加,第二个变量的数减少。如果两个变量之间的相关性为0,则它们之间没有线性关系。

关系的强度基于相关系数的值而在程度上变化。例如,值为0.2表示两个变量之间存在正相关关系,但此关系很弱并且可能不重要。在某些研究领域中,分析人员认为相关性不重要,直到该值至少达到0.8为止。但是,绝对值等于或大于0.9的相关系数将表示非常强的关系。

投资者可以使用相关性统计数据中的更改来识别金融市场,经济和股票价格中的新趋势。
重要要点
相关系数用于测量两个变量之间关系的强度。
皮尔逊相关性是统计中最常用的一种。这测量了两个变量之间线性关系的强度和方向。
值始终在-1(强负关系)和+1(强正关系)之间变化。等于或接近零的值表示较弱或没有线性关系。
小于+0.8或大于-0.8的相关系数值不视为有效。
关联统计和投资
在金融市场进行投资时,两个变量之间的相关性特别有用。例如,相关性有助于确定共同基金相对于其基准指数或其他基金或资产类别的表现。通过向现有投资组合中添加低或负相关的共同基金,投资者可以获得 分散收益。

换句话说,投资者可以使用负相关的资产或证券来对冲他们的投资组合,并降低由于波动性或价格剧烈波动引起的市场风险。许多投资者对冲投资组合的价格风险,这有效地减少了任何资本损益,因为他们想要股票或证券的股息收入或收益。

相关统计还可以使投资者确定两个变量之间的相关性何时发生变化。例如,银行股票通常与利率具有高度正相关性,因为贷款利率通常是根据市场利率计算的。如果银行的股价在利率上升的同时在下跌,那么投资者可以搜集一些歪斜的东西。如果该行业中类似银行的股价也在上涨,则投资者可以得出结论,银行存量下降的原因不是利率。相反,表现不佳的银行可能会处理内部的根本性问题。


相关系数方程
要计算皮尔逊乘积矩相关性,必须首先确定所讨论的两个变量的协方差。接下来,必须计算每个变量的标准偏差。通过将协方差除以两个变量的标准偏差的乘积来确定相关系数。


标准偏差是衡量分散从它的平均数据。协方差是衡量两个变量如何一起变化的量度,但是其大小不受限制,因此很难解释。通过将协方差除以两个标准偏差的乘积,可以计算出统计量的归一化版本。这是相关系数。

经常问的问题
相关系数是什么意思?
相关系数本质上是指两个变量彼此串联移动的程度。最高为1的正系数表示两个变量的运动沿同一方向完美对齐-如果一个变量增加,则另一个变量增加相同的量。负系数(最低为-1)正好相反,表明这两个量彼此相反。自然,几乎所有实际现象都将位于这两种极端之间。

您如何计算相关系数?
通过首先确定变量的协方差,然后将该数量除以这些变量的标准差的乘积,可以计算出相关系数。此计算可以总结为以下公式:




相关系数如何用于投资?
相关系数是投资中广泛使用的统计量度。它们在投资组合构成,定量交易和绩效评估等领域中发挥着非常重要的作用。例如,一些投资组合经理将监视其投资组合中单个资产的相关系数,以确保其投资组合的总波动率保持在可接受的范围内。同样,分析师有时会使用相关系数来预测特定资产如何受到外部因素(例如商品价格或利率)变化的影响。

美捷财智是一家全球商业和金融新闻股票行情以及市场数据和分析探索交易方法的社交平台,提供证券交易数据、股票数据分析、市场行情分析、智能选股软件、量化交易以及区块链资讯等内容服务。  

0 个评论

要回复文章请先登录注册

Debug messages:

Template: default


Session:

Session type: db

[dpp__Anwsion] Array ( [permission] => [client_info] => [human_valid] => )


Plugins:


Loaded Class:

core_config: D:\wamp64\www4\system\core/config.php

core_db: D:\wamp64\www4\system\core/db.php

Zend_Db: D:\wamp64\www4\system\Zend/Db.php

Zend_Db_Adapter_Abstract: D:\wamp64\www4\system\Zend/Db/Adapter/Abstract.php

Zend_Db_Adapter_Mysqli: D:\wamp64\www4\system\Zend/Db/Adapter/Mysqli.php

Zend_Db_Profiler: D:\wamp64\www4\system\Zend/Db/Profiler.php

Zend_Db_Statement_Interface: D:\wamp64\www4\system\Zend/Db/Statement/Interface.php

Zend_Db_Statement: D:\wamp64\www4\system\Zend/Db/Statement.php

Zend_Db_Statement_Mysqli: D:\wamp64\www4\system\Zend/Db/Statement/Mysqli.php

Zend_Registry: D:\wamp64\www4\system\Zend/Registry.php

Zend_Db_Table_Abstract: D:\wamp64\www4\system\Zend/Db/Table/Abstract.php

core_plugins: D:\wamp64\www4\system\core/plugins.php

setting_class: D:\wamp64\www4\models/setting.php

Zend_Db_Select: D:\wamp64\www4\system\Zend/Db/Select.php

Zend_Db_Expr: D:\wamp64\www4\system\Zend/Db/Expr.php

Zend_Session_Abstract: D:\wamp64\www4\system\Zend/Session/Abstract.php

Zend_Session: D:\wamp64\www4\system\Zend/Session.php

Zend_Session_SaveHandler_Interface: D:\wamp64\www4\system\Zend/Session/SaveHandler/Interface.php

Zend_Session_SaveHandler_DbTable: D:\wamp64\www4\system\Zend/Session/SaveHandler/DbTable.php

Zend_Exception: D:\wamp64\www4\system\Zend/Exception.php

Zend_Session_Exception: D:\wamp64\www4\system\Zend/Session/Exception.php

Zend_Db_Table_Select: D:\wamp64\www4\system\Zend/Db/Table/Select.php

Zend_Db_Table_Rowset_Abstract: D:\wamp64\www4\system\Zend/Db/Table/Rowset/Abstract.php

Zend_Db_Table_Rowset: D:\wamp64\www4\system\Zend/Db/Table/Rowset.php

Zend_Db_Table_Row_Abstract: D:\wamp64\www4\system\Zend/Db/Table/Row/Abstract.php

Zend_Db_Table_Row: D:\wamp64\www4\system\Zend/Db/Table/Row.php

Zend_Session_Namespace: D:\wamp64\www4\system\Zend/Session/Namespace.php

core_cache: D:\wamp64\www4\system\core/cache.php

Zend_Cache: D:\wamp64\www4\system\Zend/Cache.php

Zend_Cache_Backend: D:\wamp64\www4\system\Zend/Cache/Backend.php

Zend_Cache_Backend_Interface: D:\wamp64\www4\system\Zend/Cache/Backend/Interface.php

Zend_Cache_Backend_ExtendedInterface: D:\wamp64\www4\system\Zend/Cache/Backend/ExtendedInterface.php

core_uri: D:\wamp64\www4\system\core/uri.php

banip_class: D:\wamp64\www4\models/banip.php

Zend_Validate_Interface: D:\wamp64\www4\system\Zend/Validate/Interface.php

Zend_Validate: D:\wamp64\www4\system\Zend/Validate.php

Zend_Loader: D:\wamp64\www4\system\Zend/Loader.php

Zend_Validate_Abstract: D:\wamp64\www4\system\Zend/Validate/Abstract.php

core_user: D:\wamp64\www4\system\core/user.php

admin_class: D:\wamp64\www4\models/admin.php

TPL: D:\wamp64\www4\system\class/cls_template.inc.php

Savant3: D:\wamp64\www4\system\Savant3.php

menu_class: D:\wamp64\www4\models/menu.php

system_class: D:\wamp64\www4\models/system.php

account_class: D:\wamp64\www4\models/account.php

HTTP: D:\wamp64\www4\system\class/cls_http.inc.php

hook_class: D:\wamp64\www4\models/hook.php

plugin_class: D:\wamp64\www4\models/plugin.php

PLUTPL: D:\wamp64\www4\system\class/cls_plugins.inc.php

article_class: D:\wamp64\www4\models/article.php

Zend_Filter_Interface: D:\wamp64\www4\system\Zend/Filter/Interface.php

Zend_Filter_Digits: D:\wamp64\www4\system\Zend/Filter/Digits.php

publish_class: D:\wamp64\www4\models/publish.php

FORMAT: D:\wamp64\www4\system\class/cls_format.inc.php

Services_BBCode: D:\wamp64\www4\system\Services/BBCode.php

topic_class: D:\wamp64\www4\models/topic.php

people_class: D:\wamp64\www4\models/people.php

reputation_class: D:\wamp64\www4\models/reputation.php

module_class: D:\wamp64\www4\models/module.php

question_class: D:\wamp64\www4\models/question.php

Services_Phpanalysis_Phpanalysis: D:\wamp64\www4\system\Services/Phpanalysis/Phpanalysis.php

search_fulltext_class: D:\wamp64\www4\models/search/fulltext.php

core_pagination: D:\wamp64\www4\system\core/pagination.php

posts_class: D:\wamp64\www4\models/posts.php

core_lang: D:\wamp64\www4\system\core/lang.php


Database

[ Log time: 1618121824.543 ] [ Expend time: 0.022071838378906 ] Connect Master DB

[ Log time: 1618121824.5553 ] [ Expend time: 0.0033740997314453 ] SELECT `mt_system_setting`.* FROM `mt_system_setting`

[ Log time: 1618121824.5874 ] [ Expend time: 0.0010271072387695 ] SELECT `mt_nav`.`url` FROM `mt_nav` WHERE (is_index=1 AND status='Y') LIMIT 1

[ Log time: 1618121824.597 ] [ Expend time: 0.0010218620300293 ] SELECT `mt_ban_ip`.`id` FROM `mt_ban_ip` WHERE (ip='100.24.122.117') LIMIT 1

[ Log time: 1618121824.6004 ] [ Expend time: 0.0012810230255127 ] SELECT `mt_nav`.* FROM `mt_nav` WHERE (status='Y') ORDER BY `sort` desc

[ Log time: 1618121824.6087 ] [ Expend time: 0.0018408298492432 ] SELECT `mt_category`.* FROM `mt_category` WHERE (`type` = 'question') ORDER BY `id` ASC

[ Log time: 1618121824.6109 ] [ Expend time: 0.0016720294952393 ] SELECT `mt_category`.* FROM `mt_category` WHERE (`type` = 'question') ORDER BY `sort` ASC, `id` ASC

[ Log time: 1618121824.6132 ] [ Expend time: 0.0017008781433105 ] SELECT `mt_category`.* FROM `mt_category` ORDER BY `sort` ASC, `id` ASC

[ Log time: 1618121824.6217 ] [ Expend time: 0.0011401176452637 ] SELECT `mt_hook_plugins`.`hook`, `mt_hook_plugins`.`plugins` FROM `mt_hook_plugins` WHERE (status = 1) ORDER BY `sort` DESC

[ Log time: 1618121824.6249 ] [ Expend time: 0.0010640621185303 ] SELECT `mt_plugins`.* FROM `mt_plugins` WHERE (state = 1)

[ Log time: 1618121824.6357 ] [ Expend time: 0.0012478828430176 ] SELECT `mt_article`.* FROM `mt_article` WHERE (id = 430) LIMIT 1

[ Log time: 1618121824.6374 ] [ Expend time: 0.0013940334320068 ] SELECT `mt_category`.* FROM `mt_category`

[ Log time: 1618121824.642 ] [ Expend time: 0.0013289451599121 ] SELECT `mt_attach`.* FROM `mt_attach` WHERE (item_type = 'article' AND item_id = 430) ORDER BY `is_image` DESC, `id` ASC

[ Log time: 1618121824.648 ] [ Expend time: 0.0016658306121826 ] SELECT `mt_users`.* FROM `mt_users` WHERE (is_del = 0 AND uid = 1) LIMIT 1

[ Log time: 1618121824.6492 ] [ Expend time: 0.0008540153503418 ] SELECT `mt_users_attrib`.* FROM `mt_users_attrib` WHERE (uid = 1) LIMIT 1

[ Log time: 1618121824.6523 ] [ Expend time: 0.0014510154724121 ] SELECT `mt_article_vote`.* FROM `mt_article_vote` WHERE (`type` = 'article' AND item_id = 430 AND rating = 1)

[ Log time: 1618121824.6551 ] [ Expend time: 0.0024309158325195 ] SELECT `mt_users`.* FROM `mt_users` WHERE (is_del = 0 and uid IN(7,33,23,29,32,25,24,36,20,46,50,42))

[ Log time: 1618121824.6597 ] [ Expend time: 0.0012049674987793 ] SELECT `mt_topic_relation`.* FROM `mt_topic_relation` WHERE (item_id IN(430) AND `type` = 'article')

[ Log time: 1618121824.6611 ] [ Expend time: 0.0010650157928467 ] SELECT `mt_topic`.* FROM `mt_topic` WHERE (topic_id IN(143,345))

[ Log time: 1618121824.6665 ] [ Expend time: 0.0027828216552734 ] SELECT `mt_reputation_topic`.* FROM `mt_reputation_topic` WHERE (uid IN(1)) ORDER BY `topic_count` DESC

[ Log time: 1618121824.6682 ] [ Expend time: 0.0012130737304688 ] SELECT `mt_topic`.* FROM `mt_topic` WHERE (topic_id IN(358,357,35,352,143))

[ Log time: 1618121824.6698 ] [ Expend time: 0.0010828971862793 ] SELECT `mt_article_comments`.* FROM `mt_article_comments` WHERE (is_del = 0 and article_id = 430) ORDER BY `add_time` ASC LIMIT 100

[ Log time: 1618121824.6712 ] [ Expend time: 0.00075387954711914 ] SELECT COUNT(*) AS `n` FROM `mt_article_comments` WHERE (is_del = 0 and article_id = 430)

[ Log time: 1618121824.6744 ] [ Expend time: 0.0014700889587402 ] SELECT `mt_topic`.* FROM `mt_topic` WHERE (discuss_count_update > 1617517023) ORDER BY `discuss_count_last_week` DESC LIMIT 10

[ Log time: 1618121824.6884 ] [ Expend time: 0.0013108253479004 ] SELECT *, MATCH(question_content_fulltext) AGAINST('3045620851 3199525968 correlation coefficient' IN BOOLEAN MODE) AS score FROM mt_question WHERE MATCH(question_content_fulltext) AGAINST('3045620851 3199525968 correlation coefficient' IN BOOLEAN MODE) LIMIT 2000

[ Log time: 1618121824.7013 ] [ Expend time: 0.0015499591827393 ] SELECT `mt_category`.* FROM `mt_category`

[ Log time: 1618121824.7042 ] [ Expend time: 0.00099587440490723 ] SELECT `mt_topic`.* FROM `mt_topic` WHERE (topic_id = 143) LIMIT 1

[ Log time: 1618121824.7051 ] [ Expend time: 0.00070714950561523 ] SELECT item_id FROM mt_topic_relation WHERE topic_id IN(143) AND `type` = '10'

[ Log time: 1618121824.7058 ] [ Expend time: 0.00061893463134766 ] SELECT topic_id FROM mt_topic WHERE parent_id = 143

[ Log time: 1618121824.7072 ] [ Expend time: 0.0010941028594971 ] SELECT `mt_topic_merge`.* FROM `mt_topic_merge` WHERE (target_id = 143)

[ Log time: 1618121824.7085 ] [ Expend time: 0.000946044921875 ] SELECT `mt_topic`.* FROM `mt_topic` WHERE (topic_id = 345) LIMIT 1

[ Log time: 1618121824.7094 ] [ Expend time: 0.00072979927062988 ] SELECT item_id FROM mt_topic_relation WHERE topic_id IN(345) AND `type` = '10'

[ Log time: 1618121824.7101 ] [ Expend time: 0.00062894821166992 ] SELECT topic_id FROM mt_topic WHERE parent_id = 345

[ Log time: 1618121824.7113 ] [ Expend time: 0.000823974609375 ] SELECT `mt_topic_merge`.* FROM `mt_topic_merge` WHERE (target_id = 345)

[ Log time: 1618121824.7123 ] [ Expend time: 0.00089693069458008 ] SELECT `item_id`, `type` FROM mt_topic_relation WHERE `topic_id` IN(143,345)

[ Log time: 1618121824.7144 ] [ Expend time: 0.0013160705566406 ] SELECT `mt_posts_index`.* FROM `mt_posts_index` WHERE (((post_id IN (129,413,414,430,432,433,435,437,516,679,1035) AND post_type = 'article')) AND is_recommend = 1 AND is_del = 0) ORDER BY `add_time` DESC LIMIT 10

[ Log time: 1618121824.7159 ] [ Expend time: 0.00093388557434082 ] SELECT COUNT(*) AS `n` FROM `mt_posts_index` WHERE (((post_id IN (129,413,414,430,432,433,435,437,516,679,1035) AND post_type = 'article')) AND is_recommend = 1 AND is_del = 0)


Cache

[ Log time: 1618121824.5816 ] Backend: File

[ Log time: 1618121824.5825 ] [ Expend time: 0.000841 ] Get Cache: crond, result type: array

[ Log time: 1618121824.5827 ] [ Expend time: 0.000143 ] Get Cache: crond_timer_half_minute, result type: boolean

[ Log time: 1618121824.5829 ] [ Expend time: 0.000137 ] Get Cache: crond_timer_minute, result type: boolean

[ Log time: 1618121824.5831 ] [ Expend time: 0.000142 ] Get Cache: crond_timer_five_minutes, result type: boolean

[ Log time: 1618121824.5833 ] [ Expend time: 0.000135 ] Get Cache: crond_timer_ten_minutes, result type: boolean

[ Log time: 1618121824.5834 ] [ Expend time: 0.000136 ] Get Cache: crond_timer_half_hour, result type: boolean

[ Log time: 1618121824.5836 ] [ Expend time: 0.000135 ] Get Cache: crond_timer_hour, result type: boolean

[ Log time: 1618121824.5846 ] [ Expend time: 0.000935 ] Get Cache: crond_timer_day, result type: integer

[ Log time: 1618121824.6043 ] [ Expend time: 0.000793 ] Get Cache: nav_menu_list, result type: array

[ Log time: 1618121824.618 ] [ Expend time: 0.000870 ] Get Cache: user_group_99, result type: array

[ Log time: 1618121824.6701 ] [ Expend time: 0.000245 ] Get Cache: db_rows_cache_5f8453eee7bad4c702f983770d8c969c, result type: boolean

[ Log time: 1618121824.6781 ] [ Expend time: 0.000259 ] Get Cache: question_related_list_e07716a7dda48c7e5cac557b4afb2a29_10, result type: boolean

[ Log time: 1618121824.6918 ] [ Expend time: 0.003265 ] Save Cache: question_related_list_e07716a7dda48c7e5cac557b4afb2a29_10, result type: boolean

[ Log time: 1618121824.692 ] [ Expend time: 0.000158 ] Get Cache: update_views_article_93a3719381585a2e44d8e74a28caaf99_430, result type: boolean

[ Log time: 1618121824.6957 ] [ Expend time: 0.003604 ] Save Cache: update_views_article_93a3719381585a2e44d8e74a28caaf99_430, result type: integer

[ Log time: 1618121824.7127 ] [ Expend time: 0.000247 ] Get Cache: posts_list_by_topic_ids_e6099ca3c7cfbd6af4938f06ef24d5f7, result type: boolean

[ Log time: 1618121824.7146 ] [ Expend time: 0.000166 ] Get Cache: db_rows_cache_eb0f28a9a9656f1fd7d40cfb8a1b89b8, result type: boolean

[ Log time: 1618121824.7161 ] [ Expend time: 0.000162 ] Get Cache: posts_list_by_topic_ids_found_rows_7a3de3d1abdca1570c258b7a27b63f95, result type: boolean


Crond

[ Log time: 1618121824.5846 ] Tag: day, Last run time: 2021-04-11 08:08:04


Escape time: 0.23892879486084, 37 queries, PHP Memory usage: 8879.7890625 KB, Server time: 2021-04-11 14:17:04