- 博客(55)
- 资源 (1)
- 收藏
- 关注
原创 股票交易获取数据
投资者还需要结合其他指标和财务报表信息,以及行业和市场的分析,进行全面的投资决策。投资者还需要综合考虑公司的财务状况、盈利稳定性、盈利增长预期等因素,以及对行业和整体市场的分析,进行全面的投资决策。投资者还需要结合其他基本面指标、行业和市场的分析,以及财务报表中的其他信息,进行综合分析和判断。计算指数移动平均线时,当前价格会根据选定的时间段和权重系数,与之前的移动平均线值相结合。较短期的移动平均线(如5日或10日)反映了近期的价格走势,较长期的移动平均线(如50日或200日)则更能反映长期趋势。
2024-10-21 22:56:10 932
原创 量化投资学习
2.1:宏观策略分析法:从宏观经济大方向入手,再应用到具体股票也叫自上而下的研究方法,需要理解这个趋势的核心驱动因素有哪些,然后选择什么主题背景行业及投资组合。2.2价值投资法,也叫自下而上的研究方法,选出最具价值的股票,需要对行业有较深理解,知道行业未来规模有多大,行业有什么特点,公司核心竞争力和护城河。1:投资定义就是付出一定的代价,期望能够得到一定汇报,可能会出现没有回报。体系性主题:宏观因素对具体股票的影像,央行放水有降息受益主题。事件性主题:利好事件,公司危机。聚宽,掘金,真格量化。
2024-10-14 21:52:25 270
原创 leetcode腾讯经典146
题目:https://leetcode-cn.com/problems/lru-cache/submissions/ 代码:class LRUCache { public: LRUCache(int capacity) : _cap(capacity) {} // O(1) // hash 查找,如果找到了,就把 list 中的节点接下来移到头部 int get(int key) { au...
2019-06-29 08:25:22 131
原创 leetcode 腾讯精选238
题目: https://leetcode-cn.com/problems/product-of-array-except-self/submissions/ 代码: class Solution { public: vector productExceptSelf(vector & nums) { int size = nums.size(); if (size == 0) return...
2019-06-27 18:36:47 110
原创 leetcode 腾讯精选236
题目:https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/submissions/ 代码:/** Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *righ...
2019-06-26 20:20:58 128
原创 leetcode 腾讯精选557
题目:https://leetcode-cn.com/problems/reverse-words-in-a-string-iii/submissions/ 代码: class Solution { public: string reverseWords(string s) { int size = s.size(); string res; int i = 0; while (i <...
2019-06-25 17:48:58 150
原创 leetcode腾讯精选344
题目: https://leetcode-cn.com/problems/reverse-string/submissions/ 代码: class Solution { public: void reverseString(vector& s) { int size = s.size(); char tmp; int i = 0, j = size - 1; w...
2019-06-25 07:56:30 108
原创 leetcode腾讯经典292
题目:https://leetcode-cn.com/problems/nim-game/submissions/ 代码: class Solution { public: bool canWinNim(int n) { int dim4 = n %4; if(dim4 == 0) return false; else { return true; } } };
2019-06-24 08:12:54 205
原创 leetcode 腾讯精选237
题目: https://leetcode-cn.com/problems/delete-node-in-a-linked-list/submissions/ 代码:/** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x)...
2019-06-23 08:36:03 106
原创 leetcode腾讯精选235
题目: https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-search-tree/solution/ 代码:/** Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *rig...
2019-06-21 19:08:09 78
原创 leetcode 腾讯精选231
题目: https://leetcode-cn.com/problems/power-of-two/submissions/ 代码: class Solution { public: bool isPowerOfTwo(int n) { if(n <= 0) return false; if((n&(n - 1)) == 0) return true;...
2019-06-20 21:16:17 103
原创 leetcode腾讯精选230
题目:https://leetcode-cn.com/problems/kth-smallest-element-in-a-bst/submissions/ 代码: /** Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; Tre...
2019-06-20 08:27:00 138
原创 leetcode 腾讯精选217
题目: https://leetcode-cn.com/problems/contains-duplicate/submissions/ 代码: class Solution { public: bool containsDuplicate(vector& nums) { int size = nums.size(); if(size <= 1) return false; int...
2019-06-18 21:36:35 79
原创 leetcode腾讯精选215
题目: https://leetcode-cn.com/problems/kth-largest-element-in-an-array/submissions/ 代码: class Solution { public: int findKthLargest(vector& nums, int k) { if(k < 0) return 0; int size = nums....
2019-06-18 08:13:22 88
原创 leetcode腾讯精选206
题目: https://leetcode-cn.com/problems/reverse-linked-list/submissions/ 代码:/** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NU...
2019-06-17 08:17:41 101
原创 leetcode 腾讯精选169
题目:https://leetcode-cn.com/problems/majority-element/submissions/ 代码:class Solution { public: int majorityElement(vector& nums) { int size = nums.size(); if(size == 0) { return...
2019-06-15 19:15:02 74
原创 leetcode 腾讯精选160
题目:https://leetcode-cn.com/problems/intersection-of-two-linked-lists/comments/ 代码: /** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x...
2019-06-14 23:21:23 226
原创 leetcode腾讯精选50-155
题目: https://leetcode-cn.com/problems/min-stack/submissions/ 代码: class MinStack { private: vector<int> vec; public: /** initialize your data structure here. */ MinStack() { } void push(int x) {...
2019-06-13 19:44:02 119
原创 leetcode腾讯精选148
题目: https://leetcode-cn.com/problems/sort-list/submissions/ 代码: /** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} ...
2019-06-13 08:11:20 97
原创 leetcode 腾讯精选142
题目: https://leetcode-cn.com/problems/linked-list-cycle-ii/submissions/ 代码: /** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(...
2019-06-12 08:24:42 69
原创 leetcode腾讯精选141
题目:https://leetcode-cn.com/problems/linked-list-cycle/submissions/ 代码: /** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL...
2019-06-11 07:45:48 102
原创 leetcode 腾讯精选-89
题目:https://leetcode-cn.com/problems/gray-code/submissions/ 代码: class Solution { public: vector grayCode(int n) { int size = 1 << n; vector res; for (int i = 0; i < size; i++) { int a = i ^ (i...
2019-06-09 15:41:07 184
原创 leetcode腾讯精选78
题目: https://leetcode-cn.com/problems/subsets/submissions/ 代码: class Solution { public: vector<vector> subsets(vector& nums) { vector<vector> res; int size = nums.size(); for (int i = 0...
2019-06-09 14:49:34 102
原创 leetcode 腾讯精选-62
题目: https://leetcode-cn.com/problems/unique-paths/submissions/ 代码: class Solution { public: int uniquePaths(int m, int n) { if(m <= 0 || n <=0) { return 0; } ...
2019-06-09 00:28:34 134
原创 leetcode 腾讯精选-61
题目:https://leetcode-cn.com/problems/rotate-list/ 代码: /** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; / class...
2019-06-08 23:27:48 112
原创 leetcode 腾讯精选-59
题目:https://leetcode-cn.com/problems/spiral-matrix-ii/ 代码: class Solution { public: vector<vector> generateMatrix(int n) { vector<vector<int>> matrix(n,vector<int>(n,0)); int i ...
2019-06-08 22:53:41 104
原创 leetcode腾讯精选50-136
题目: https://leetcode-cn.com/problems/single-number/ 代码: int singleNumber(int* nums, int numsSize){ int res = nums[0]; for(int i = 1; i < numsSize; i++) { res ^=nums[i]; } return res; } ...
2019-06-07 08:32:31 86
原创 leetcode 腾讯精选122
题目: https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-ii/ 代码: int maxProfit(int* prices, int pricesSize){ if (!prices || pricesSize <= 1) return 0; int *buy=NULL, *sell=NULL, profit=...
2019-06-06 08:18:59 67
原创 leetcode 腾讯精选121
题目:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/ 代码: class Solution { public: int maxProfit(vector& prices) { if(prices.empty()) { return 0; } int len = prices.size(); ...
2019-06-05 07:57:33 61
原创 leetcode 腾讯精选-104
题目: https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/ 代码: /** Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x)...
2019-06-04 08:11:59 93
原创 leetcode 腾讯精选50-88
题目:https://leetcode-cn.com/problems/merge-sorted-array/ 代码:class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int sum=m+n; int pos=...
2019-06-03 08:22:54 85
原创 leetcode腾讯精选50-054
题目: https://leetcode-cn.com/problems/spiral-matrix/ 代码:class Solution { public: vector spiralOrder(vector<vector>& matrix) { int m = matrix.size(); if(m==0) return {}; int n = matrix[0].size...
2019-05-31 08:41:41 86
原创 leetcode 腾讯精选070
题目: https://leetcode-cn.com/problems/climbing-stair 代码: class Solution { public: int climbStairs(int n) { if(n <= 0) return 0; if(n == 1) { return 1; } if(n == 2) { return 2; } int ans = 1...
2019-05-30 08:16:11 78
原创 leetcode腾讯精选046
题目: https://leetcode-cn.com/problems/permutations/ 代码: void dfs(vector<vector> &res,vector nums,vector &out,bool *f,int total) { int size = out.size(); if(size == total) { res.push_back(...
2019-05-29 08:16:46 163
原创 leetcode 腾讯精选-43
题目: https://leetcode-cn.com/problems/multiply-strings/ 代码: #define max(a,b) ((a)<(b))?(b):(a) class Solution { public: string multiply(string num1, string num2) { if (num1 == "0" || num2 == "0") ...
2019-05-27 23:33:31 96
原创 leetcode腾讯精选-33
题目: https://leetcode-cn.com/problems/search-in-rotated-sorted-array 代码: int binarysearch(vector &nums, int target,int l,int e) { if (nums.empty()) { return -1; } if (l > e) { return -1; } while...
2019-05-26 18:07:10 84
原创 leetcode腾讯精选50-023
题目: https://leetcode-cn.com/problems/merge-k-sorted-lists/ 代码: /** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; */...
2019-05-26 17:12:52 95
原创 leetcode腾讯精选50-23
题目: https://leetcode-cn.com/problems/merge-k-sorted-lists/comments/ 代码: /** Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NUL...
2019-05-25 08:22:08 108
原创 leetcode腾讯精选-53
题目: https://leetcode-cn.com/problems/maximum-subarray 代码: class Solution { public: int maxSubArray(vector& nums) { int size = nums.size(); if(size == 0) return 0; int res = nums[0]; for(in...
2019-05-24 08:00:43 141
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人