# 金融 / 股票 / 行业 / 中间函数 ## `stockGetIndustrydata(stockid, end_t, level, industry_type)` 声明:function 返回证券指定日期有效的行业数据 | 参数 | 类型 | 说明 | | --------------- | -------- | ----------------------- | | `stockid` | string | 字符串。证券代码 | | `end_t` | datetime | 日期。截止日期 | | `level` | int | 整数。行业级数(1,2,3) | | `industry_type` | string | 字符串。行业属性名称 | 返回:array ### 示例 范例01:万科A在20201207的一级申万行业数据 ```tsl // 万科A在20201207的一级申万行业数据 return StockGetIndustrydata('SZ000002', 20201207T, 1, '申万行业'); ``` ## `stockIndustryArr(industry_type, level_n, end_t)` 声明:function 返回指定日指定级别行业列表,与系统参数(股票)相关。默认返回申万行业的一级行业列表 | 参数 | 类型 | 说明 | | --------------- | -------- | ---------------- | | `industry_type` | string | 字符串。行业类别 | | `level_n` | int | 整数。行业级数 | | `end_t` | datetime | 日期。截止日期 | 返回:array ### 示例 范例01:在20201207的SWHY分类的申万1级行业成分 ```tsl // 在20201207的SWHY分类的申万1级行业成分 return StockIndustryArr('SWHY', 1, 20201207T); ``` ## `stockIndustryInfoLvN(stock_id, end_t, level, industry_type, v_type)` 声明:function 指定证券指定日期指定级别行业名称,默认取申万的一级行业代码 | 参数 | 类型 | 说明 | | --------------- | -------- | --------------------------------- | | `stock_id` | string | 字符串。证券代码 | | `end_t` | datetime | 日期。截止日期 | | `level` | int | 整数。行业级别 | | `industry_type` | string | 字符串。行业分类 | | `v_type` | int | 用户自定义。返回值类型,取值如下: | 返回:string ### 示例 范例01:万科A在20201207的一级申万行业名称 ```tsl // 万科A在20201207的一级申万行业名称 return StockIndustryInfoLvN('SZ000002', 20201207T, 1, '申万行业', 1); // 输出:申万房地产 ```