“嗯,對我來說似乎很棒”

(從我一個尊敬的作家,賽斯·高汀

這當然是可以,您做出來了。

如果您將它運送到全世界(甚至展示給同事),可能是因為您喜歡它。因為是你自己做出的。

但是,如果您的音樂,圖形設計,網站(無論您從事什麼工作)都無法在市場上引起共鳴,那可能是因為您忘了為他們來做。

為他人來想才是設計的核心。

這個群體中的人認為看起來很棒嗎? 他們需要什麼?

去做到那一點。

Algorithmic Trading Model for Simple Mean-Reversion Strategy Using Python Take 2

NOTE: This script is for learning purposes only and does not constitute a recommendation for buying or selling any stock mentioned in this script.

SUMMARY: This project aims to construct and test an algorithmic trading model and document the end-to-end steps using a template.

INTRODUCTION: This algorithmic trading model examines a simple mean-reversion strategy for a stock. The model enters a position when the price reaches either the highest or lowest points for the last X number of days. The model will exit the trade when the stock price crosses the mean of the same window size.

In iteration Take1, we set up the models using a trend window size for long trades only. The window size will vary from 10 to 50 trading days at a 5-day increment.

In this Take2 iteration, we will set up the models using a trend window size for long and short trades. The window size will vary from 10 to 50 trading days at a 5-day increment.

ANALYSIS: In iteration Take1, we analyzed the stock prices for Costco Wholesale (COST) between January 1, 2016, and April 1, 2021. The top trading model produced a profit of 133.80 dollars per share. The buy-and-hold approach yielded a gain of 192.73 dollars per share.

In this Take2 iteration, we analyzed the stock prices for Costco Wholesale (COST) between January 1, 2016, and April 1, 2021. The top trading model produced a profit of 113.21 dollars per share. The buy-and-hold approach yielded a gain of 192.73 dollars per share.

CONCLUSION: For the stock of COST during the modeling time frame, the simple long-and-short trading strategy did not produce a better return than the buy-and-hold approach. We should consider modeling this stock further by experimenting with more variations of the strategy.

Dataset ML Model: Time series analysis with numerical attributes

Dataset Used: Quandl

The HTML formatted report can be found here on GitHub.

Binary Classification Model for Company Bankruptcy Prediction Using TensorFlow Take 3

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: This project aims to construct a predictive model using various machine learning algorithms and document the end-to-end steps using a template. The Company Bankruptcy Prediction dataset is a binary classification situation where we attempt to predict one of the two possible outcomes.

INTRODUCTION: The research team collected the data from the Taiwan Economic Journal from 1999 to 2009. Company bankruptcy was defined based on the business regulations of the Taiwan Stock Exchange. Because not catching companies in a shaky financial situation is a costly business proposition, we will maximize the precision and recall ratios with the F1 score.

The data analysis first appeared on the research paper, Liang, D., Lu, C.-C., Tsai, C.-F., and Shih, G.-A. (2016) Financial Ratios and Corporate Governance Indicators in Bankruptcy Prediction: A Comprehensive Study. European Journal of Operational Research, vol. 252, no. 2, pp. 561-572.

In iteration Take1, we constructed and tuned several classic machine learning models using the Scikit-Learn library. We also observed the best results that we could obtain from the models.

In iteration Take2, we constructed and tuned a XGBoost model. We also will observe the best results that we can obtain from the model.

This Take3 iteration will construct and tune a three-layer TensorFlow model. We also will observe the best results that we can obtain from the model.

ANALYSIS: In iteration Take1, the machine learning algorithms’ average performance achieved an F1 score of 94.37%. Two algorithms (Extra Trees and Random Forest) produced the top F1 metrics after the first round of modeling. After a series of tuning trials, the Extra Trees model turned in an F1 score of 97.39% using the training dataset. When we applied the Extra Tree model to the previously unseen test dataset, we obtained an F1 score of 55.55%.

In iteration Take2, the XGBoost algorithm achieved an F1 score of 96.48% using the training dataset. After a series of tuning trials, the XGBoost model turned in an F1 score of 98.38%. When we applied the XGBoost model to the previously unseen test dataset, we obtained an F1 score of 58.18%.

In this Take3 iteration, The performance of the TensorFlow model achieved an average F1 score of 67.03% after 20 epochs using the training dataset. When we applied the XGBoost model to the previously unseen test dataset, obtained an F1 score of 41.55%.

CONCLUSION: In this iteration, the TensorFlow model did not appear to be suitable for modeling this dataset. We should consider experimenting with TensorFlow for further modeling.

Dataset Used: Company Bankruptcy Prediction Data Set

Dataset ML Model: Binary classification with numerical attributes

Dataset Reference: https://archive.ics.uci.edu/ml/datasets/Taiwanese+Bankruptcy+Prediction

One potential source of performance benchmark: https://www.kaggle.com/fedesoriano/company-bankruptcy-prediction

The HTML formatted report can be found here on GitHub.

Algorithmic Trading Model for Simple Mean-Reversion Strategy Using Python Take 1

NOTE: This script is for learning purposes only and does not constitute a recommendation for buying or selling any stock mentioned in this script.

SUMMARY: This project aims to construct and test an algorithmic trading model and document the end-to-end steps using a template.

INTRODUCTION: This algorithmic trading model examines a simple mean-reversion strategy for a stock. The model enters a position when the price reaches either the highest or lowest points for the last X number of days. The model will exit the trade when the stock price crosses the mean of the same window size.

In this Take1 iteration, we will set up the models using a trend window size for long trades only. The window size will vary from 10 to 50 trading days at a 5-day increment.

ANALYSIS: In this Take1 iteration, we analyzed the stock prices for Costco Wholesale (COST) between January 1, 2016, and April 1, 2021. The top trading model produced a profit of 133.80 dollars per share. The buy-and-hold approach yielded a gain of 192.73 dollars per share.

CONCLUSION: For the stock of COST during the modeling time frame, the simple long-only trading strategy did not produce a better return than the buy-and-hold approach. We should consider modeling this stock further by experimenting with more variations of the strategy.

Dataset ML Model: Time series analysis with numerical attributes

Dataset Used: Quandl

The HTML formatted report can be found here on GitHub.

Binary Classification Model for Company Bankruptcy Prediction Using XGBoost Take 2

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: This project aims to construct a predictive model using various machine learning algorithms and document the end-to-end steps using a template. The Company Bankruptcy Prediction dataset is a binary classification situation where we attempt to predict one of the two possible outcomes.

INTRODUCTION: The research team collected the data from the Taiwan Economic Journal from 1999 to 2009. Company bankruptcy was defined based on the business regulations of the Taiwan Stock Exchange. Because not catching companies in a shaky financial situation is a costly business proposition, we will maximize the precision and recall ratios with the F1 score.

The data analysis first appeared on the research paper, Liang, D., Lu, C.-C., Tsai, C.-F., and Shih, G.-A. (2016) Financial Ratios and Corporate Governance Indicators in Bankruptcy Prediction: A Comprehensive Study. European Journal of Operational Research, vol. 252, no. 2, pp. 561-572.

In iteration Take1, we constructed and tuned several classic machine learning models using the Scikit-Learn library. We also observed the best results that we could obtain from the models.

This Take2 iteration will construct and tune an XGBoost model. We also will observe the best results that we can obtain from the models.

ANALYSIS: In iteration Take1, the machine learning algorithms’ average performance achieved an F1 score of 94.37%. Two algorithms (Extra Trees and Random Forest) produced the top F1 metrics after the first round of modeling. After a series of tuning trials, the Extra Trees model turned in an F1 score of 97.39% using the training dataset. When we applied the Extra Tree model to the previously unseen test dataset, we obtained an F1 score of 55.55%.

In this Take2 iteration, the XGBoost algorithm achieved an F1 score of 96.48% using the training dataset. After a series of tuning trials, the XGBoost model turned in an F1 score of 98.38%. When we applied the XGBoost model to the previously unseen test dataset, we obtained an F1 score of 58.18%.

CONCLUSION: In this iteration, the XGBoost model appeared to be a suitable algorithm for modeling this dataset. We should consider using the algorithm for further modeling.

Dataset Used: Company Bankruptcy Prediction Data Set

Dataset ML Model: Binary classification with numerical attributes

Dataset Reference: https://archive.ics.uci.edu/ml/datasets/Taiwanese+Bankruptcy+Prediction

One potential source of performance benchmark: https://www.kaggle.com/fedesoriano/company-bankruptcy-prediction

The HTML formatted report can be found here on GitHub.

Binary Classification Model for Company Bankruptcy Prediction Using Scikit-Learn Take 1

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: This project aims to construct a predictive model using various machine learning algorithms and document the end-to-end steps using a template. The Company Bankruptcy Prediction dataset is a binary classification situation where we attempt to predict one of the two possible outcomes.

INTRODUCTION: The research team collected the data from the Taiwan Economic Journal from 1999 to 2009. Company bankruptcy was defined based on the business regulations of the Taiwan Stock Exchange. Because not catching companies in a shaky financial situation is a costly business proposition, we will maximize the precision and recall ratios with the F1 score.

The data analysis first appeared on the research paper, Liang, D., Lu, C.-C., Tsai, C.-F., and Shih, G.-A. (2016) Financial Ratios and Corporate Governance Indicators in Bankruptcy Prediction: A Comprehensive Study. European Journal of Operational Research, vol. 252, no. 2, pp. 561-572.

This Take1 iteration will construct and tune several classic machine learning models using the Scikit-Learn library. We also will observe the best results that we can obtain from the models.

ANALYSIS: The average performance of the machine learning algorithms achieved an F1 score of 94.37%. Two algorithms (Extra Trees and Random Forest) produced the top F1 metrics after the first round of modeling. After a series of tuning trials, the Extra Trees model turned in an F1 score of 97.39% using the training dataset. When we applied the Extra Tree model to the previously unseen test dataset, we obtained an F1 score of 55.55%.

CONCLUSION: In this iteration, the Extra Trees model appeared to be a suitable algorithm for modeling this dataset. We should consider using the algorithm for further modeling.

Dataset Used: Company Bankruptcy Prediction Data Set

Dataset ML Model: Binary classification with numerical attributes

Dataset Reference: https://archive.ics.uci.edu/ml/datasets/Taiwanese+Bankruptcy+Prediction

One potential source of performance benchmark: https://www.kaggle.com/fedesoriano/company-bankruptcy-prediction

The HTML formatted report can be found here on GitHub.

Seth Godin’s Akimbo: The Right Size Project

In his Akimbo podcast, Seth Godin teaches us how to adopt a posture of possibility, change the culture, and choose to make a difference. Here are my takeaways from the episode.

In this podcast, Seth discusses the ideas behind big projects, changing the world, resilience, and perfectionism.

We transform the world, big or small, by doing things or projects. Our career is nothing but a series of projects. When we dedicate our effort to one project, we cannot work on something else simultaneously. Not able to work on something else is the opportunity cost of what we choose to do.

The size of a project is a choice. The complexity of a project is another choice. The decisions we make about projects are all choices, and these choices have an opportunity cost. The best way to make an impact is not to spread our resources too thin to accomplish anything.

When we try to do too many things simultaneously, we will not be doing much of anything. If we pick the right project and allocate the right resources to it, we are more likely to accomplish our goal.

How do we determine what the right size for a project is? It depends on who we are seeking to change, to reach, or to serve. Suppose we can identify the smallest, viable audience for a project. In that case, we have much better odds at succeeding in helping our audience. Helping the smallest viable audience is a much better approach than trying to reaching the mass and hoping someone will respond to our desire to make the change.

The size of a project also depends on our predictions because every project is a bet on how we perceive the future will turn out. We predict that our project will work, but the world will be the same when it is finished. The world, however, as we know, does not standstill. The longer it takes to bring our project to the world, the more likely the world does not need the product or the project the way we thought it did.

To counter the on-going changing world, we will need to build resilience in everything we do. One way to build resilience is to take on right-sized projects. Right-sized projects do not spread our resources too thin. We can take on several smaller but right-sized projects instead of one giant project. When we bet on several smaller projects, rather than one large one, we have opportunities to pivot when the world changes quicker than we could finish the projects.

Along with the project size and resilience, we also need to be aware of perfectionism. Perfectionism does not mean excellence or quality. Perfectionism is polishing something where people do not care about the polish. Perfectionism is trying to consider every single possible objection and addressing it.

We erroneously believe that we never get a second chance to make a first impression. We erroneously believe that if what we ship is not perfect, we will be shamed forever. We ignore the simple reality that whatever we ship will not be perfect when it comes time to change the world.

What we can do is engage the market early and often. Figure out what is essential and get the crucial areas correct. We then ship our work and learn from the feedback. We also adjust and evolve our approach by bringing resilience to the fore. We will choose not to hide behind perfectionism.

Some people may view the concepts of right-size, resilience, and quality work as constraints. We should view them as the boundaries that help define our projects. Carefully choose the number of projects as we need options to be resilient. On the other hand, do not commit to too many options because we also need concentration and focus on getting through the dip. And most of all, strive for high-quality work and excellence but do not be a perfectionist.

給未來的自我一封信

(從我一個尊敬的作家,賽斯·高汀

我們經常向過去的自我發送隱喻信,指責我們所做的選擇。 在信中我們對錯過的機會或過去的錯誤表示遺憾。 並且很容易的將我們所陷入的混亂歸咎於我們年輕的自我。

但您會對未來的自我說些什麼? 當您在幾個月或幾年後讀完那封信時,那又會感覺如何?

也許您會發現到您現在面臨的危機或災難,沒有像您擔心的那樣糟糕。 也許您會表示樂觀並把這樂觀的看法轉換成行動。 也許您會為自己過去的經歷來產生些同理心,因為過去的自我也只是在盡力而為。