金融工程研究:机构投资者的风格投资与公司债市场因子分析

需积分: 0 0 下载量 17 浏览量 更新于2024-06-22 收藏 1.64MB PDF 举报
"天风证券发布的金融工程专题报告,主要涉及两方面内容,一是机构投资者在股票市场的风格投资,二是美国公司债市场的共有因子研究。报告由吴先兴撰写,旨在探讨机构投资者如何依据市值、估值/成长和板块等风格维度进行资产配置,并通过分析这些风格投资的行为对股票收益的影响。同时,报告还介绍了四个能有效解释美国公司债市场收益的风格因子,包括票息、防御、动量和价值,这些因子在固定收益资产的因子挖掘上有所突破。" 详细知识点说明: 1. 风格投资:机构投资者在股票市场中常常依据特定的风格维度进行投资,例如市值(大型股、中型股、小型股)、估值/成长(价值股、成长股)以及板块(科技、医疗、消费等)。报告指出,机构投资者倾向于采用风格分组策略进行资产配置,而非随机选择。 2. 风格投资与收益预测:研究发现,股票所处风格的资金流入与其未来收益有正相关性,也就是说,如果某一风格受到资金青睐,其包含的股票可能有更高的预期收益。相反,资金流出的风格则可能预示着负向的收益趋势。 3. 风格配置统计量:报告中提到了衡量配置密度的统计量,这可能是用来量化机构投资者在不同风格间的配置偏好,以评估风格投资的集中程度和变化趋势。 4. 跨风格配置:基于特征的跨风格配置可能涉及到机构投资者如何根据股票的基本面或技术面特征调整其在不同风格间的投资比例,以此优化投资组合的风险与回报。 5. 风格与股票收益的关联:报告深入分析了风格收益和资金流入对未来个股收益的影响,揭示了风格配置与市场表现之间的动态关系。收益分解部分可能探讨了风格投资收益的来源和驱动因素。 6. 公司债市场共有因子:在固定收益领域,研究者构建了票息、防御、动量和价值四类风格因子,这些因子能够解释公司债市场的收益特征。其中,防御、动量和价值因子不仅具有超额收益,而且这些超额收益往往源于投资者行为偏差。 7. 因子的超额收益:票息、防御、动量和价值这四个因子在公司债市场中的显著超额收益表明,理解并利用这些因子可以帮助投资者提高债券投资的效益。 8. 风险提示:报告强调,内容基于相关文献分析,不构成直接的投资建议,投资者在实际操作中应充分考虑市场风险。 这两部分研究为投资者提供了深入理解机构投资行为和固定收益市场收益驱动因素的视角,对于构建更精准的大类资产配置模型具有指导意义。

逐行详细解释以下代码并加注释from tensorflow import keras import matplotlib.pyplot as plt base_image_path = keras.utils.get_file( "coast.jpg", origin="https://img-datasets.s3.amazonaws.com/coast.jpg") plt.axis("off") plt.imshow(keras.utils.load_img(base_image_path)) #instantiating a model from tensorflow.keras.applications import inception_v3 model = inception_v3.InceptionV3(weights='imagenet',include_top=False) #配置各层对DeepDream损失的贡献 layer_settings = { "mixed4": 1.0, "mixed5": 1.5, "mixed6": 2.0, "mixed7": 2.5, } outputs_dict = dict( [ (layer.name, layer.output) for layer in [model.get_layer(name) for name in layer_settings.keys()] ] ) feature_extractor = keras.Model(inputs=model.inputs, outputs=outputs_dict) #定义损失函数 import tensorflow as tf def compute_loss(input_image): features = feature_extractor(input_image) loss = tf.zeros(shape=()) for name in features.keys(): coeff = layer_settings[name] activation = features[name] loss += coeff * tf.reduce_mean(tf.square(activation[:, 2:-2, 2:-2, :])) return loss #梯度上升过程 @tf.function def gradient_ascent_step(image, learning_rate): with tf.GradientTape() as tape: tape.watch(image) loss = compute_loss(image) grads = tape.gradient(loss, image) grads = tf.math.l2_normalize(grads) image += learning_rate * grads return loss, image def gradient_ascent_loop(image, iterations, learning_rate, max_loss=None): for i in range(iterations): loss, image = gradient_ascent_step(image, learning_rate) if max_loss is not None and loss > max_loss: break print(f"... Loss value at step {i}: {loss:.2f}") return image #hyperparameters step = 20. num_octave = 3 octave_scale = 1.4 iterations = 30 max_loss = 15. #图像处理方面 import numpy as np def preprocess_image(image_path): img = keras.utils.load_img(image_path) img = keras.utils.img_to_array(img) img = np.expand_dims(img, axis=0) img = keras.applications.inception_v3.preprocess_input(img) return img def deprocess_image(img): img = img.reshape((img.shape[1], img.shape[2], 3)) img /= 2.0 img += 0.5 img *= 255. img = np.clip(img, 0, 255).astype("uint8") return img #在多个连续 上运行梯度上升 original_img = preprocess_image(base_image_path) original_shape = original_img.shape[1:3] successive_shapes = [original_shape] for i in range(1, num_octave): shape = tuple([int(dim / (octave_scale ** i)) for dim in original_shape]) successive_shapes.append(shape) successive_shapes = successive_shapes[::-1] shrunk_original_img = tf.image.resize(original_img, successive_shapes[0]) img = tf.identity(original_img) for i, shape in enumerate(successive_shapes): print(f"Processing octave {i} with shape {shape}") img = tf.image.resize(img, shape) img = gradient_ascent_loop( img, iterations=iterations, learning_rate=step, max_loss=max_loss ) upscaled_shrunk_original_img = tf.image.resize(shrunk_original_img, shape) same_size_original = tf.image.resize(original_img, shape) lost_detail = same_size_original - upscaled_shrunk_original_img img += lost_detail shrunk_original_img = tf.image.resize(original_img, shape) keras.utils.save_img("DeepDream.png", deprocess_image(img.numpy()))

2023-06-07 上传