123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- //相关性分析
- export const chartrelevanceTextArr = [
- `<p style='font-weight:bold;'>相关性计算处理逻辑:</p>
- <p style='font-weight:bold;'>单因子:</p>
- <p>1、取数:取计算窗口的时间长度,从当前时间往前推移对应的时间长度,取该日期区间,指标A序列值和指标B序列值;</p>
- <p>2、变频:根据指标A和指标B的频度对取出的数据序列做如下处理</p>
- <p>①指标A高频,对指标B升频(线性方程插值法补全数据);</p>
- <p>②指标B高频,对指标A升频(线性方程插值法补全数据);</p>
- <p>③指标A,指标B同频,不作处理;</p>
- <p>3、计算:按照分析周期,以指标A为基准,对指标B作对应期数的位移,根据公式相关系数R = SUM[(Xi-Mx)*(Yi-My)]/[(N-1)(SDx*SDy)],计算每个期数对应的相关性;</p>
- <p style='height:20px;'></p>
- <p>注:指标B作位移时,若以指标A的日期序列未找到指标B的值,则往前找最近值进行计算(往前找的范围为当前日期往前推移计算窗口的时间范围)</p>`,
- `<p style='font-weight:bold;'>相关性配置:</p>
- <p>1、计算窗口:参与计算的历史数据时间段;</p>
- <p>2、分析周期:指标B领先A的期数,如配置参数10个月,表示B领先A -10月、B领先A -9月,...,B领先A 9月、B领先A 10月,每期分别计算相关性值;</p>`,
- `<p style='font-weight:bold;'>滚动相关性配置:</p>
- <p>1、计算窗口:参与计算的时间段长度,从两个指标都有值的日期开始滚动的取计算窗口长度的值进行计算,如配置计算窗口1个月,则2023.7.28的值取2023.6.28~2023.7.28时间段,2023.7.27的值取2023.6.27~2023.7.27时间段;</p>
- <p>2、B领先A:B指标领先A指标的参数,为0时不领先;</p>
- <p style='height:20px;'></p>
- <p style='font-weight:bold;'>多因子:</p>
- <p>可一次选择多个指标,与标的指标进行相关性计算。每一个因子指标与标的指标的计算逻辑,同单因子模式。</p>`
- ]
- export const chartrelevanceTextArrEn=[
- `<p style='font-weight:bold;'>Instruction for Correlation Calculation Processing Logic:</p>
- <p style='font-weight:bold;'>Single Indicator:</p>
- <p>1、 Data Retrieval: Determine the time length of the calculation window, and move backwards from the current time by this duration to obtain a range of dates. Retrieve values for indicator A series and indicator B series within this date range.</p>
- <p>2、Frequency Adjustment:</p>
- <p>a. If indicator A is higher frequency, upsample indicator B (use linear equation interpolation to fill in data).</p>
- <p>b. If indicator B is higher frequency, upsample indicator A (use linear equation interpolation to fill in data).</p>
- <p>c. If indicator A and B are at the same frequency, no further processing is required.</p>
- <p>Calculation: For each analysis period, use indicator A as a reference and shift indicator B by corresponding periods. Calculate the correlation for each period using the formula correlation coefficient R = SUM[(Xi-Mx)*(Yi-My)]/[(N-1)(SDx*SDy)].</p>
- <p style='height:20px;'></p>
- <p>Note: When shifting indicator B, if there's no value found for a date in the sequence of indicator A, search backward for the closest value within the time range of the calculation window moving back from the current date.</p>`,
- `<p style='font-weight:bold;'>Correlation Configuration:</p>
- <p>1. Calculation Window: The historical data time segment involved in the calculation.</p>
- <p>2. Analysis Period: The number of periods that indicator B leads ahead of A; for instance, if configured with a parameter of 10 months, it indicates that B leads A by -10 months to +10 months, with correlation values calculated separately for each period.</p>`,
- `<p style='font-weight:bold;'>Rolling Correlation Configuration:</p>
- <p>1. Calculation Window: The length of time involved in calculations starts from when both indicators have available values and rolls forward taking values within the duration of the calculation window for computation. For example, if configured with a 1-month calculation window, then the value for July 28th, 2023 will be taken from June 28th to July 28th, 2023; while the value for July 27th will be taken from June 27th to July 27th.</p>
- <p>2. B Leads A: The parameter by which indicator B leads ahead of indicator A; when set to 0, there is no lead.</p>
- <p style='height:20px;'></p>
- <p style='font-weight:bold;'>Multiple Indicators:</p>
- <p>Multiple indicators can be selected at a time to calculate the correlation with the target indicator. The calculation logic of each factor index and the target index is the same as the Single Indicato.</p>`
- ]
- //拟合方程曲线
- export const fittingEquationListTextArr = [
- `<p style='font-weight:bold;'>拟合方程曲线处理逻辑:</p>
- <p>1、选择两组有相关性的指标</p>
- <p>2、对两组在选定时间范围内的每一个时间节点,生成拟合方程Y=aX+b以及相关系数R²</p>
- <p>3、分别画出弹性系数a,截距b,相关系数R²,在选定时间范围内的曲线图</p>`,
- ]
- export const fittingEquationListTextArrEn = [
- `<p style='font-weight:bold;'>Curve processing logic:</p>
- <p>1、select two groups of relevant indicators</p>
- <p>2、generate the fitting equation Y=aX+b and correlation coefficient R² for each time node in the selected time range of the two groups</p>
- <p>3、and draw the curves of the elastic coefficient a, intercept b, and correlation coefficient R² within the selected time range respectively</p>`,
- ]
- // 统计特征
- export const statisticFeatureListTextArr = [
- `<p style='font-weight:bold;'>标准差处理逻辑:</p>
- <p>计算所选时间范围内数据的样本标准差s,s=sqrt(((x1-x)^2 (x2-x)^2 ......(xn-x)^2)/(n-1)),n表示数据个数</p>`,
- `<p style='font-weight:bold;'>百分位处理逻辑:</p>
- <p>1、数据个数百分位算法:数据区间第一个(较远日期)和最后一个数据点(较近日期)分别为 (T1,S1),(T2,S2)。T代表时间。S代表对应的值;N=T1到T2时间段指标数据个数。n=小于等于S2的数据个数。个数百分位=(n-1)/(N-1) ,N=1时不计算。</p>
- <p>2、数据区间百分位算法:对所选时间范围内的数据,取最大值Max,最小值Min,计算Max-Min,百分位=(现值-Min)/(Max-Min),Max=Min时不计算
- </p>`,
- `<p style='font-weight:bold;'>频率分布处理逻辑:</p>
- <p>1、在所选时间范围内,取最大值和最小值;</p>
- <p>2、根据频段数划分多个间距相同的区间(左闭右开,最后一个区间为左闭右闭),统计数据值落在每个区间的数据个数;</p>
- <p>3、频率=落在某区间数据个数/所选时间段内数据总个数;</p>
- <p>4、累计频率为从最小值所在区间对应的频率开始累加;</p>`
- ]
- export const statisticFeatureListTextArrEn = [
- `<p style='font-weight:bold;'>Standard Deviation Processing Logic:</p>
- <p>Calculate the sample standard deviation s for the data within the selected time range, where s = sqrt(((x1-x)^2 + (x2-x)^2 + ... +(xn-x)^2)/(n-1)), and n represents the number of data points.</p>`,
- `<p style='font-weight:bold;'>Percentile Processing Logic:</p>
- <p>For the data within the selected time range, find the maximum value Max and minimum value Min, compute Max-Min, and calculate the percentile as (current value - Min) / (Max - Min). If Max=Min, do not compute.</p>`,
- `<p style='font-weight:bold;'>频率分布处理逻辑:</p>
- <p>1、在所选时间范围内,取最大值和最小值;</p>
- <p>2、根据频段数划分多个间距相同的区间(左闭右开,最后一个区间为左闭右闭),统计数据值落在每个区间的数据个数;</p>
- <p>3、频率=落在某区间数据个数/所选时间段内数据总个数;</p>
- <p>4、累计频率为从最小值所在区间对应的频率开始累加;</p>`
- ]
- //跨品种分析
- export const crossVarietyAnalisisTextArr = [
- `<p style="font-weight:bold;">一、处理逻辑</p>
- <p>1、百分位计算公式:</p>
- <p>(1)数据个数百分位算法:数据区间第一个(较远日期)和最后一个数据点(较近日期)分别为 (T1,S1),(T2,S2)。T代 表时间。S代表对应的值。 N=T1到T2时间段指标数据个数。n=小于等于S2的数据个数。个数百分位=(n-1)/(N-1) ,N=1时不计算。</p>
- <p>(2)数据区间百分位算法:对所选时间范围内的数据,取最大值Max,最小值Min,计算Max-Min,百分位=(现值-Min)/(Max-Min),Max=Min时不计算</p>
- <p>2、取值方式:</p>
- <p>(1)通过“选择日期”和“时间长度”,时间范围为“选择日期”至选择的日期往过去推“时间长度”,在这个时间段找出指标最大值和最小值,进行百分位计算。</p>
- <p>(2)若在(1)的时间范围下找不到值,则继续往过去找,直到找到值。</p>
- <p>3、图表说明:</p>
- <p> (1)某个品种会有多个坐标点(坐标点的数量取决于设置的日期数量);</p>
- <p> (2)坐标点的X、Y值取实际日期与值。</p>`,
- `<p style="font-weight:bold;">二、相关配置</p>
- <p>1、基本配置</p>
- <p>(1)管理员进行品种管理、标签管理;</p>
- <p>(2)使用者对标签的品种关联指标。</p>
- <p>2、计算配置</p>
- <p>(1)时间长度:默认显示6个月;</p>
- <p>(2)选择日期:最多支持选择5个日期;</p>
- <p>(3)X轴坐标:选择标签;</p>
- <p>(4)Y轴坐标:选择标签;</p>
- <p>(5)图表名称:X轴坐标和Y轴坐标的拼接。</p>`
- ]
- export const crossVarietyAnalisisTextArrEn = [
- `<p style="font-weight:bold;">I. Processing Logic</p>
- <p>1. Percentile Calculation Formula: For the selected time range, determine the maximum value (Max) and minimum value (Min), calculate Max-Min, and compute the percentile as (Current Value - Min) / (Max - Min). If Max = Min, do not calculate.</p>
- <p>2. Value Retrieval Method:</p>
- <p>(1) Using "Select Date" and "Time Span," set the time range from the "Select Date" to the date that goes back by the chosen "Time Span." Within this period, find the maximum and minimum values of the indicator for percentile calculation.</p>
- <p>(2) If no values are found within the time frame mentioned in (1), continue to look further back in time until values are found.</p>
- <p>3. Chart Description:</p>
- <p>(1) A particular commodity will have multiple coordinate points (the number of points depends on the number of dates set).</p>
- <p>(2) The X and Y values of coordinate points correspond to actual dates and values.</p>`,
- `<p style="font-weight:bold;">II. Related Configuration</p>
- <p>1. Basic Configuration:</p>
- <p>(1) Administrators manage commodities and tags.</p>
- <p>(2) Users associate commodities with indicators based on tags.</p>
- <p>2. Calculation Configuration:</p>
- <p>(1) Time Span: The default display is 6 months.</p>
- <p>(2) Select Date: Supports selecting up to 5 dates.</p>
- <p>(3) X-axis Coordinate: Choose a tag.</p>
- <p>(4) Y-axis Coordinate: Choose a tag.</p>
- <p>(5) Chart Name: Concatenation of X-axis and Y-axis coordinates tags.</p>`
- ]
|