
[{"content":" Issue # Matplotlib default font does not have Korean characters so Korean text outputs as blocks when plotting figures.\nimport matplotlib.pyplot as plt x= {\u0026#34;사과\u0026#34;: 100, \u0026#34;귤\u0026#34;: 80, \u0026#34;호박\u0026#34;: 60, \u0026#34;수박\u0026#34;: 40} plt.bar(x.keys(), x.values()) # output: UserWarning: Glyph 49324 (\\N{HANGUL SYLLABLE SA}) missing from font(s) DejaVu Sans. func(*args, **kwargs)... Blocks instead of Korean text Fix # Change the font used by Matplotlib.\nimport matplotlib.pyplot as plt plt.rcParams[\u0026#39;font.family\u0026#39;] = \u0026#39;AppleGothic\u0026#39; # for mac. For Windows, use \u0026#39;Malgun Gothic\u0026#39; plt.rcParams[\u0026#39;axes.unicode_minus\u0026#39;] = False x= {\u0026#34;사과\u0026#34;: 100, \u0026#34;귤\u0026#34;: 80, \u0026#34;호박\u0026#34;: 60, \u0026#34;수박\u0026#34;: 40} plt.bar(x.keys(), x.values()) Korean texts are shown correctly ","date":"2025 December 22","externalUrl":null,"permalink":"/guides/korean-matplotlib/","section":"Guides","summary":"","title":"Fixing broken Korean text in Python Matplotlib","type":"guides"},{"content":"Welcome to my guides section. Here, I will organize things I learned to do and share so that future me and others can spend less time struggling.\n","date":"2025 December 22","externalUrl":null,"permalink":"/guides/","section":"Guides","summary":"","title":"Guides","type":"guides"},{"content":"","date":"2025 December 22","externalUrl":null,"permalink":"/tags/python/","section":"Tags","summary":"","title":"Python","type":"tags"},{"content":"","date":"2025 December 22","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":"","date":"2025 November 26","externalUrl":null,"permalink":"/knowledge-base/finance/","section":"Knowledge Base","summary":"","title":"Finance","type":"knowledge-base"},{"content":"A collection of my semi-formal academic notes on topics like quantum computing, machine learning, finance, statistics and time-series analysis.\n","date":"2025 November 26","externalUrl":null,"permalink":"/knowledge-base/","section":"Knowledge Base","summary":"","title":"Knowledge Base","type":"knowledge-base"},{"content":"In the field of econophysics, we apply physics to economics.\nYou may ask, what is the justification of such technique?\nIt all starts from drawing parallels between physical and economic systems. For example, financial markets, just like physical systems, exhibit randomness at the microscopic scale (atoms and sub-atoms v.s. individual traders) but reveal regularities at the macroscopic level. With the right assumptions, the two systems could be considered isomorphic. The same stochastic differential equations can describe both the microscopic dynamics of particles and also the probabilistic evolution of asset prices.\nIn summary, we can use physics as a vehicle to describe financial systems.\nLater, I will add some examples of econophysical concepts like the application of the quantum harmonic oscillator (QHO) to model the stock returns and the log-periodic power law (LPPL)\n","date":"2025 October 22","externalUrl":null,"permalink":"/knowledge-base/finance/what-is-econophysics/","section":"Knowledge Base","summary":"","title":"Econophysics","type":"knowledge-base"},{"content":"","date":"2025 October 22","externalUrl":null,"permalink":"/tags/econophysics/","section":"Tags","summary":"","title":"Econophysics","type":"tags"},{"content":"","date":"2025 October 22","externalUrl":null,"permalink":"/tags/lppl/","section":"Tags","summary":"","title":"LPPL","type":"tags"},{"content":"","date":"2025 October 22","externalUrl":null,"permalink":"/tags/qho/","section":"Tags","summary":"","title":"QHO","type":"tags"},{"content":" What is a classical harmonic oscillator? # Before we talk quantum, we start with the simpler, classical variant. A classical harmonic oscillator is any system that experiences a restoring force proportional to displacement. The simplest example is a ball on a spring. When the ball is displaced from its equilibrium position, the spring pulls it back, and it oscillates. The force is given by Hooke\u0026rsquo;s Law:\n$$ F=-kx, $$where $F$ is the restoring force, $k$ is the sprint constant, and $x$ is the displacement from equilibrium. Newton\u0026rsquo;s second law of motion leads to the difference equation:\n$$ m\\ddot{x}+kx=0, $$whose solution is deterministic and periodic: $$ x(t)=Acos(\\omega t - \\phi), $$ where $A$ and $\\phi$ are determined by initial conditions.\nWhat is a quantum harmonic oscillator? # The quantum harmonic oscillator (QHO) is the quantum-mechanical version of the classical harmonic oscillator. Among other things, it is a good approximation for small vibrations of atoms and molecules. It is also notable that QHO is one of the few systems in quantum mechanics with an exact, closed-form solution.\nFigure 1. Trajectories of harmonic oscillator according to classical mechanics (A and B) and quantum mechanics (C to H). Image is sourced from Wikipedia. How are the two oscillators different? # Table 1 shows the main differences between the quantum and classical harmonic oscillators. The most noticeable difference is that we do not have continuous energy in quantum mechanics. Instead, we have discrete quantum states (state 0, 1, 2,\u0026hellip; and so on). We call the 0th state, the ground state, and the states after are called the 1st excited state, 2nd excited state, and so on. Also, unlike the ball on a spring which can have zero energy (at rest/equilibrium), a QHO has a non-zero energy at the lowest, ground state.\nTable 1. A comparison between QHO and classical harmonic oscillator Feature Classical Harmonic Oscillator Quantum Harmonic Oscillator Energy Continuous (any value possible) Discrete (quantized energy levels: $( E_n = (n + \\tfrac{1}{2})\\hbar\\omega ))$ Ground State Energy Zero (can be at rest) Non-zero: ($\\tfrac{1}{2}\\hbar\\omega )$ — zero-point energy Position and Momentum Can be known exactly at any moment Governed by the Heisenberg Uncertainty Principle — can’t know both exactly Motion Oscillates smoothly and deterministically Described by a probability wave (wavefunction) — doesn\u0026rsquo;t have a definite position Allowed States Infinite, smooth transitions Only certain quantum states ( $n = 0, 1, 2, \\dots )$, each with a distinct wavefunction Why do we need the QHO in finance? # Because it works!\nWe use it because, with the right assumptions, we can apply the QHO model to estimate the distribution of the stock returns much better than traditional methods like the Black-Scholes model which assumes that financial returns are normally distributed. However, real-world returns are far form normal and exhibit skewness and fat tails (excess kurtosis). This means that with the Black-Scholes model, among many things, will under-evaluate risks.\nOn the other hand, the QHO model is able to incorporates these real-world characteristics of financial returns.\nWhy not the classical harmonic oscillator? # The classical harmonic oscillator does not work mainly because its solution is deterministic which is very far from the probabilistic nature of financial markets.\nA simple example of the QHO model in finance # We estimate the QHO model and the random walk model (RWM; normal distribution) using the daily log-returns of the S\u0026amp;P500 over the last 25 years.\nFigure 2. A comparison between the QHO and RWM models (left) and the proportion of QHO components (right). In the left sub-plot of Figure 2, it is easy to see how far off the normal distribution, in blue, is from the actual data (histogram). On the other hand, the QHO model precisely estimate the empirical distribution of the log-returns.\nOther things # Later I will provide you with the derivation of the QHO model.\n","date":"2025 October 22","externalUrl":null,"permalink":"/knowledge-base/finance/qho-for-finance/","section":"Knowledge Base","summary":"","title":"Quantum Harmonic oscillator: A better method for estimating stock returns","type":"knowledge-base"},{"content":"","date":"2025 October 22","externalUrl":null,"permalink":"/tags/quantum-finance/","section":"Tags","summary":"","title":"Quantum-Finance","type":"tags"},{"content":"","date":"2025 October 20","externalUrl":null,"permalink":"/knowledge-base/quantum-computing/","section":"Knowledge Base","summary":"","title":"Quantum computing","type":"knowledge-base"},{"content":"PhD Candidate\nYonsei University\nResearch Interests: AI in Finance, Econophysics, Energy Economics\nEmail: ganghyeok(at)yonsei(dot)ac(dot)kr\nCV · LinkedIn · Google Scholar · ORCID\nEducation # Yonsei University\nMA/PhD in Industrial Engineering, 2023–2026 (expected)\nUniversity of Oxford\nBA in Mathematics, 2016–2020\nPublications # Lee, G., Jeong, M., Park, T., \u0026amp; Ahn, K., (2025). More than ex-post fitting: log-periodic power law and its AI-based classification. Humanities and Social Sciences Communications, 12(1), 1-13. (SSCI, Top 6.8%, JCR 2024)\nLim, K., Shin, J., Goo, G., Lee, G., \u0026amp; Ahn, K. (accepted). Strategic self-presentation and its effects on first date success. Springer Proceedings in Mathematics and Statistics. (SCOPUS)\nLee, G., Joo, K., \u0026amp; Ahn, K. (2020, July). Market efficiency of the crude palm oil: Evidence from quantum harmonic oscillator. Journal of Physics: Conference Series, 1593, 012037. (SCOPUS)\nWorking Papers # Quantitative structure and sentiment of news articles on housing policies. Submitted to Chaos. (SCIE, Top 3.6%, JCR 2024) Work in Progress # Pairs trading with biofuel feedstock commodities Controlled Growth Process with FOMC minutes Nuclear power plant decomposition using algorithm-based AI detection Survival of primary care institutions in South Korea with LLM Funding # Quantum ARC seed funding (Round 2): Scotland-Korea collaboration on quantum simulation in asset pricing based on the quantum harmonic oscillator Reviewer # Carbon Balance and Management, Cogent Economics and Finance, Computational Economics, Emerging Markets Review, Humanities and Social Sciences Communications, International Review of Economics and Finance, Journal of Transport Economics and Policy, Pattern Recognition Letters, Physica A, PLoS ONE, Renewable Energy, Scientific Reports, Technological Forecasting and Social Change\n","date":"2025 October 17","externalUrl":null,"permalink":"/about/","section":"Glad you're here! Take a look around.","summary":"","title":"Robin Ganghyeok Lee","type":"page"},{"content":" 1. Introduction # Once you start using Obsidian to write notes, you will come across the concept of linking and tagging notes. And you will soon see yourself doing it because, unless you are not like me, you will become addicted to slowly building a pretty network of your notes that you can see in Graph View. But how are linking and tagging different? Because they both represent connections between notes, it can get a bit confusing. So, in this article, I will briefly go over exactly what links and tags are in Obsidian, how they are different, and how to use them.\nA small graph of my notes 2. Tags # This is a tag #icecream. Tags group your notes together to specific ideas. You can add them anywhere in your note. You can also associate a note with tags by creating a YAML front matter (a block of metadata at the top of the Markdown file enclosed by three dashes ---) .\n--- tags: - keyword-1 - keyword-2 - keyword-3 --- A python-like list also works in the front matter. Note that this method is not in the official Obisidan docs and the docs specifically stresses that the tags should be formatted as a Markdown list. Regardless, it works.\n--- tags: [keyword-1, keyword-2, keyword-3] --- Just remember two things:\nTags can\u0026rsquo;t have spaces (so use underscores or hyphens instead if you want to separate out words (or use camelCase or PascalCase)) Tags can\u0026rsquo;t be just numbers. So #2025 will be no good. If you want to be fancy, you can also use nested tags to create tag hierarchies. This can be done by using forward slash (/) in a tag. For example, #snacks/icecream and #snacks/candies are hierarchical tags with #snack as the parent and #icecream and #candies as children. Unless you have a very specific need, I wouldn\u0026rsquo;t personally recommend nested tags too much; they over-complicate things. A simple, not-nested tags are more than good enough for most, if not all, occasions.\n3. Links # More precisely called internal links, links are a way to refer to other files in the Obsidian vault. While tags can only be part of many-to-one uni-directional connections (notes being the many and a tag being the one that can only receive connections), links are naturally one-to-one bi-directional connections (between two notes).\nA diagram comparing links and tags. Links create bi-directional connections between notes. Tags create uni-directional connections from a note to a tag. Creating a link is easy. you can simply press [ twice to automatically get [[]] and start typing the name of the file you want to link.\n[[linked-page]] You can also use the Markdown link format to create a link using square and round brackets.\n[linked-page](linked-page.md) A nice feature with links is that they can have aliases that are displayed instead of the file name. This is especially useful if the file name is long or uninformative. Just add a | after the file name and type your preferred text.\n[[a-very-long-file-name-that-is-uninformative|A short alias]] 4. How are links and tags different? # Although they serve the same purpose of linking ideas and notes. There are some differences in how they operate inside Obsidian.\n4.1. Click behaviors are different # If you click a tag, Obsidian opens a search for that tag on the left sidebar that shows all the notes containing the same tag.\nIf you click a link, Obsidian will open that linked note.\n4.2. Links automatically updates, tags do not (out of the box) # A big difference that might push one to use links is that Obsidian (by default) automatically updates links when you rename a file. This is especially useful if you have a note that has many backlinks (files that has a link to the note). You don\u0026rsquo;t have to painstakingly edit each note that has links to the renamed link.\nTags, on the other hand, cannot be altered retroactively (at least in standalone Obsidian). If you tag a note, it will always have that tag unless you manually change it. So, for example, if you find a typo in your tag #equiptment after using that tag for 100 notes, you have to find the tag in each note and edit the tag. However, this is a non-problem if you install community plugins like Tag Wrangler which let you bulk rename tags.\n4.3. Links and tags are displayed separately in Graph View # In Obsidian\u0026rsquo;s Graph View, notes are nodes and links are lines (or vertices and edges, respectively, if you are using graph theory terminology). By default, tags are not displayed in Graph View; you have to enable them in the filters. Tags appear as nodes, and lines connect notes containing the tags to the tag node.\nOne small problem with using both tags and links is that you can get duplicate connections. I have a MOC (map of content) note where I have linked all my separate research notes. I also use the tag #research for every note that can be categorized as research. So, now, I have two central nodes, serving nearly the same purpose and connecting the same nodes. For some, this might not even be a problem, but for me, I find things like this sub-par and annoying.\nA Graph View with tags enabled. Notice how tags (in green) complicate the graph with repetitive connections. This is especially noticeable on the two central nodes (one gray, the other green) just below the center of the image. 5. How to use links and tags # 5.1. Option 1 # One option is to simply don\u0026rsquo;t use tags at all. Instead, use certain notes as tags and link these notes whenever you want to categorize a note. For example, instead of #coffee, you can use [[coffee]] to signal that the note you are writing is about coffee. This way you won\u0026rsquo;t have two nodes #coffee and [[coffee]] in your graph.\nHowever, this solution does not work for me because I write my blog articles in Obsidian and I want to use tags (in YAML front matter) as they serve a function on my website. If I didn\u0026rsquo;t have this extra condition, this would have been the best solution.\n5.2. Option 2 # The second option, you guessed it, is to use tags only. But how do you create a link-like tag when tags by definition cannot be a one-to-one connection between two notes? Also, the click behavior of tags is to display a list of the notes with that tag on the sidebar; how would you open a note by clicking a tag?\nThe solution is somewhat complicated. For each note, we create a tag which is going to be used as an alias for that specific note only. In other words, you have a tag for each note. To apply this solution, you have to first install the community plugin, Tag Wrangler. We will be using a feature of the plugin called Tag Pages which converts the click behavior of tags to opening the note (page) that has that tag as an alias. Thus, we now have tags that function like links. Is this all confusing? It should be, because it is. It\u0026rsquo;s a fair bit janky as well, so I don\u0026rsquo;t recommend it.\nThe first question I had after applying this method was what would happen if, by accident, there are two or more Tag Pages with the same alias. I tested this out by creating two pages with the same alias.\n--- Alias: #some-tag\u0026#34; --- And I created a new note and typed #some-tag. When I clicked this tag multiple times, it always directed me to the first page I created with the alias - the second page is unreachable.\nThis is not the only problem. With this setup, we now have two types of tags:\nTags that are actual tags, Tags that act like links to pages. And you wouldn\u0026rsquo;t know which of the two a tag is just by looking at it. This is far from ideal.\n5.3. Option 3 # The best option, personally, is to simply use both. Though they overlap in functionality, the overlap is not complete. So, if you choose to use only one, you will be missing out on some features that are only available on the other. For example, if you choose only to use links, you will be missing out on features like search by tags, available in the left sidebar, and tag view, available in the right sidebar that keeps a tally on the number of pages with each tag.\n6. Summary # There is no wrong way to use tags and links; after a while, you will find a system that best suits your needs. It is important, at least for myself, to remember that in the end, Obsidian is just a tool. I shouldn\u0026rsquo;t spend too much time struggling to find the perfect setup but do what Obsidian is meant to do.\nKeep on writing and enjoy the process of creating your personal digital library of knowledge.\nExternal resources # These are some articles I checked out while I was figuring out my own system of using links and tags.\nhttps://forum.obsidian.md/t/a-guide-on-links-vs-tags-in-obsidian/28231 https://forum.obsidian.md/t/folders-vs-linking-vs-tags-the-definitive-guide-extremely-short-read-this/78468 ","date":"2025 October 16","externalUrl":null,"permalink":"/guides/obsidian-links-vs-tags/","section":"Guides","summary":"","title":"Links vs. Tags in Obsidian","type":"guides"},{"content":"","date":"2025 October 16","externalUrl":null,"permalink":"/tags/obsidian/","section":"Tags","summary":"","title":"Obsidian","type":"tags"},{"content":"","date":"2025 October 16","externalUrl":null,"permalink":"/tags/tag-wrangler/","section":"Tags","summary":"","title":"Tag-Wrangler","type":"tags"},{"content":" 1. Introduction # The Amihud illiquidity measure (Amihud, 2002) is the average ratio of daily absolute stock return to its dollar trading volume. Mathematically, the Amihud illiquidity of a stock for a given period is defined as: $$ {ILLIQ}=\\frac{1}{N}\\sum_{t=1}^{N}{\\frac{|{R_t}|}{VOLD_t}}, \\tag{1} $$ where $R_t$ is the daily return at time $t$, $VOLD_t$ is the trading volume in USD at time $t$ and $N$ is the number of days in the given period. Note that it is a measure of illiquidity and not liquidity - a stock with high Amihud illiquidity has low liquidity. If you want to measure the daily Amihud illiquidity instead of the average Amihud illiquidity over a certain period, you can simplify Equation 1 to get the simple ratio: $$ {ILLIQ_t}=\\frac{|{R_t}|}{VOLD_t}. \\tag{2} $$ In essence, the measure considers how much a trade moves the stock’s price, the so called price impact. A few reasons why this measure is useful:\nSimplicity: The measure is the average of a simple ratio of absolute daily return to dollar volume, capturing the price impact of trading. Hence, it is straightforward to understand and calculate. Data availability: The measure uses two types of information (daily return and volume) that are readily available. However, the measure is not without its flaws. If you have a look at Equation 1, the nominator ($|R_t|$) is a small positive number close to 0 while the denominator (${VOLD_t}$) can get arbitrarily large, especially for large cap stocks. Consequently, ${ILLIQ}$ is going to be an extremely small positive number close to 0. Such absolute difference in scale between the two terms suggests that the measure will be largely driven by the denominator, $VOLD_t$. In other words, assuming a stock has an average daily return of $0.05\\%$ ($0.0005$), we expect that: $$ {ILLIQ_t}=\\frac{|{R_t}|}{VOLD_t}\\approx\\frac{0.0005}{VOLD_t}. \\tag{3} $$ 2. Empirical analysis # 2.1. Data # As a sanity check that the measure works as intended, we conduct a simple empirical analysis. We use daily data on top 3 US REITs (real estate investment trust) and Korean REITs (K-REITs). The data (price and volume) was collected for a period of 2 years and the stock prices of K-REITs were converted to USD using daily KRW/USD exchange rate.\nTable 1. Top 3 US REITs and K-REITs and their market capitalizations. Rank US REITs Market Cap K-REITs Market Cap 1 Welltower Inc. $113 billion SK REIT $962 million 2 Prologis Inc. $107 billion Lotte REIT $783 million 3 American Tower Corp. $87 billion ESR Kendall Square REIT $767 million Considering the much larger market capitalization of US REITs compared to K-REITs, we expect US REITs to be more liquid (and hence have lower Amihud illiquidity).\n2.2. Methodology # We calculate the daily $ILLIQ$ using Equation 2 for the entire data period of 2 years. We post-process the result by taking the logarithm and applying exponential smoothing so that we can better visualize the results. Rounding up, for each daily stock data:\nWe multiply the the daily volume to the stock price to get the daily dollar volume, $VOLD_t$, We convert the stock price, $P_t$, into daily return, $R_t=P_t/P_{t-1}-1$, We calculate the daily log Amihud Illiquidity, $\\ln{ILLIQ_t}=\\ln{\\frac{|{R_t}|}{VOLD_t}}$. 3. Results # In Figure 1, we can see the large illiquidity gap between US and Korean REITs; all three K-REITs have much higher illiquidity. It is also interesting to see an illiquidity spike in 2023 for K-REITs. The spike matches the time of major domestic credit crunch, triggered in late 2022 by the \u0026ldquo;Legoland crisis\u0026rdquo; where the developer for Legoland Korea theme park defaulted on 205 billion KRW (approx. $150 million) of commercial paper.\nFigure 1. Amihud Illiqudity of TOP US and Korean REITs. 4. Other measures # There are other stock (il)liquidity measures and indicators. Provided below is a table of the major ones.\nMetric What it is How it indicates liquidity Trading Volume The total number of shares of a stock traded over a specific period. High volume means many buyers and sellers are active, making it easy to buy or sell shares quickly without significantly impacting the price. Bid-Ask Spread The difference between the highest price a buyer is willing to pay (bid) and the lowest price a seller is willing to accept (ask). A narrow spread indicates high liquidity because there is a consensus on the stock\u0026rsquo;s price, while a wide spread suggests less liquidity. Turnover Ratio The number of shares traded over a period divided by the average number of shares outstanding. A high turnover ratio signifies that a stock is being traded frequently, which points to higher liquidity. Market Depth The volume of buy and sell orders at different price levels. A stock with high market depth has a large number of orders at various prices, indicating it can absorb large trades without major price swings. Price Impact Measures how much a trade moves the stock\u0026rsquo;s price. A lower price impact means large trades have less effect on the price, which is a sign of higher liquidity. References # Yakov Amihud. Illiquidity and stock returns: Cross-section and time-series effects. Journal of Financial Markets, 5:31–56, 2002. ","date":"2025 October 15","externalUrl":null,"permalink":"/knowledge-base/finance/amihud-illiquidity/","section":"Knowledge Base","summary":"","title":"Amihud illiquidity","type":"knowledge-base"},{"content":"","date":"2025 October 15","externalUrl":null,"permalink":"/tags/amihud-illiqudity/","section":"Tags","summary":"","title":"Amihud-Illiqudity","type":"tags"},{"content":"","date":"2025 October 15","externalUrl":null,"permalink":"/tags/finance/","section":"Tags","summary":"","title":"Finance","type":"tags"},{"content":"I write about what I learned, provide guides on things I am interested in and share my opinions on variety of topics. Naturally, the website is separated into three main sections:\nKnowledge base This is where I keep my semi-formal academic notes on topics like quantum computing, machine learning, finance, statistics and time-series analysis. If you are interested in these topics, you might find something useful there. Guides You will find well-thought-out guides on programming, tech, and other miscellaneous topics so that people (most likely future me) spend less time searching for the same fix. Blog This is the corner of the site that is most laidback. Here, I will write freely about anything that comes to my mind. ","date":"2025 October 13","externalUrl":null,"permalink":"/","section":"Glad you're here! Take a look around.","summary":"","title":"Glad you're here! Take a look around.","type":"page"},{"content":"","externalUrl":null,"permalink":"/knowledge-base/quantum-computing/quantum-circuit-learning/","section":"Knowledge Base","summary":"","title":"","type":"knowledge-base"},{"content":"","externalUrl":null,"permalink":"/authors/","section":"Authors","summary":"","title":"Authors","type":"authors"},{"content":"","externalUrl":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"},{"content":"","externalUrl":null,"permalink":"/series/","section":"Series","summary":"","title":"Series","type":"series"},{"content":"","externalUrl":null,"permalink":"/knowledge-base/time-series/","section":"Knowledge Base","summary":"","title":"Time-series","type":"knowledge-base"},{"content":"","externalUrl":null,"permalink":"/tags/time-series/","section":"Tags","summary":"","title":"Time-Series","type":"tags"}]