2011년 2월 23일 수요일

멀티 프로세스와 멀티 쓰레드

■ 멀티 프로세스와 멀티 쓰레드

이 두가지는 동시에 두 가지 이상의 루틴을 실행 할 수 있는 역활을 한다.
( 실제로 동시에 여러가지가 아니고 cpu가 하나라면 한 클럭에 하나의 명령만 실행할수 있다.
cpu가 두개라면 두번.. 보통 cpu가 많아봤자 네개 이다. 어쨌건 OS에서는 재주껏 분산해서 멀티로 돌아가는 것처럼 보이게 한다.  )

멀티 프로세스는 일단 포크라는것을 한다. 그래서 윈도우 작업관리자에서 관리되는 프로세스가 하나가 더는다.
유닉스 계열에서는 ps 명령어로 보면 알수 있다. 포크를 하면 하나의 프로세스가 두개의 프로세스로 늘어난다.
이 프로세스들은 서로 통신을 할려면 IPC( 세마포어, 큐, 공유메모리 )를 통해야만 한다.
왜냐면 전혀 다른 프로세스니까.. ( 물론 포크되었으므로 부모 자식의 관계는 있다. )
즉 똑같은 프로그램이 복사가 되서 새로 뜨는것이다. ( 물론 이놈이 포크되기 전인지 후인지 알수 있다. )

멀티 쓰레드는 프로세스를 복사하는것이 아니라 Function 단위로 실행시키는 것이다.
즉 어떤 Function에서 다른 Function을 호출하면서 그 밑의 루틴을 다시 실행하는 것이다.
이 것은 같은 프로세스이므로 멀티 프로세스에 비해서 부하를 덜준다. ( 그래서 경량프로세스란 말을 하는 것이다. )
또한 다른 장점이 부 쓰레드내에 특정변수 메모리번지를 알아 낼 수 있다면 그 메모리에 접근이 가능하다.
왜냐면 같은 프로세스니까 운영체제를 통해서 접근가능하게 지원이 되는것이다.

결론은 멀티 프로세스는 똑같은 놈이 하나 더 늘어나는거고, 멀티 쓰레드는 함수가 백그라운드에서 따로 실행이 되는것이다.


■ 멀티 프로세스와 멀티 쓰레드의 동작원리

일반적인 개념에서 멀티 쓰레드가 멀티 프로세스 보다 효율적이다. 왜 그런지 살펴보면..
프로그램이 동작하기 위해서는 두가지의 메모리 공간이 필요하게 되는데 그것이 바로 코드공간과 데이터 공간이다.

코드 공간 : 특정 프로세스의 동작상태를 기록하는 것으로 하나의 프로세스가 독립적인 코드 포인터를 가지고 동작하기 위해 필요하다.
데이터 공간 : 하나의 프로세스가 작동 중에 필요로 하는 데이터를 저장해 두기 위한 것으로 프로그램 변수나 메모리 스택 공간을 말한다.

하나의 프로세스는 동작하기 위해 이러한 두가지의 공간을 모두 요구하게 되는데.. 멀티 프로세스란 이러한 개별적인 프로세스들이 서로 간에 독립적인 코드공간과 데이터 공간을 유지하면서 함께 작동할 수 있는 상태를 말한다.

반면에 쓰레드란 좀더 작은 규모의 프로세스를 말한다. 다수 개의 쓰레드는 하나의 프로세스 하부에서 나타나는데 이들은 독립적인 코드
공간을 가지고 개별적으로 작동할 수 있지만, 독립적인 데이터 공간을 가지지 않으므로 하나의 프로세스 아래에 있는 모든 쓰레드들은 해당 프로세스의 데이터 공간을 각각 공유하게 된다.

멀티쓰레드란 이런 방식으로 하나의 프로세스가 다수 개의 작업을 각각 스레드를 이용하여 동시에 작동 시킬 수 있는 것을 말하는데 보통 쓰레드의 생성과 파괴는 코드공간의 관리 만을 필요로 하기 때문에 프로세스의 생성과 파괴보다 훨씬 적은 자원을 소모한다. 이 때문에 멀티 쓰레드는 동일 작업을 위한 멀티 프로세스보다 훨씬 효율적이라고 이야기한다.


■ 멀티쓰레드의 효율성과 안정성 문제

다수개의 쓰레드가 동일한 데이터 공간을 공유하면서 이들을 수정한다는 점에 필연적으로 생기는 문제이다.
멀티 프로세스의 방식의 프로그램에서 하나의 프로세스가 자신의 데이터 공간을 망가뜨린다면 그것은 해당 프로세스의 중단을 낳게 될 것이다. 하지만 멀티 쓰레드 방식의 프로그램에서는 하나의 쓰레드가 자신이 사용하던 데이터 공간을 망가뜨린다면 그 결과는 하나의 데이터 공간을 공유하는 모든 쓰레드를 작동불능 상태로 만들어 버릴 것 이다. 이러한 문제에 대비하기 위해 Critical Section 기법이 존재한다.

공짜 점심의 끝

http://rein.kr/blog/archives/540

How do I decide whether to use ATL, MFC, Win32 or CLR for a new C++ project?

http://stackoverflow.com/questions/821676/how-do-i-decide-whether-to-use-atl-mfc-win32-or-clr-for-a-new-c-project

It depends on your needs.
Using the CLR will provide you with the most expressive set of libraries (the entire .NET framework), at the cost of restricting your executable to requiring the .NET framework to be installed at runtime, as well as limiting you to the Windows platform (however, all 4 listed technologies are windows only, so the platform limitation is probably the least troublesome).
However, CLR requires you to use the C++/CLI extensions to the C++ language, so you'll, in essense, need to learn some extra language features in order to use this. Doing so gives you many "extras," such as access to the .net libraries, full garbage collection, etc.
ATL & MFC are somewhat trickier to decide between. I'd refer you to MSDN's page for choosing in order to decide between them. The nice thing about ATL/MFC is that you don't need the .NET framework, only the VC/MFC runtimes to be installed for deployment.
Using Win32 directly provides the smallest executables, with the fewest dependencies, but is more work to write. You have the least amount of helper libraries, so you're writing more of the code.

The .NET Framework - What About Speed?

The .NET Framework - What About Speed?
 Speed is important, of course. For an in-depth discussion of speed considerations in managed
code, I will refer you to a few excellent articles in the MSDN Library (msdn.Microsoft. com/library):

-“A Baker’s Dozen: Thirteen Things You Should Know Before Porting Your Visual C++ .NET Programs to Visual Studio 2005” by Stanley Lippman.
-“Best Practices for Writing Efficient and Reliable Code with C++/CLI” by Kenny Kerr.
-“C++: The Most Powerful Language for .NET Framework Programming” by Kenny Kerr.
-“Writing Faster Managed Code: Know What Things Cost” by Jan Gray.
-“Writing High-Performance Managed Applications: A Primer” by Gregor Noriskin (includes an overview of the CLR Profiler).
-“Tips for Improving Time-Critical Code”.
-“Optimization Best Practices” in the Visual C++ section.

.NET Programming Reference Site

http://andromedarabbit.net/wp/tag/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%EC%96%B8%EC%96%B4/page/7/

Tips for Improving Time-Critical Code

http://msdn.microsoft.com/en-us/library/eye126ky.aspx

http://kyuniitale.blog.me/40028835071

Writing fast code requires understanding all aspects of your application and how it interacts with the system. This topic suggests alternatives to some of the more obvious coding techniques to help you ensure that the time-critical portions of your code perform satisfactorily.
To summarize, improving time-critical code requires that you:
  • Know which parts of your program have to be fast.
  • Know the size and speed of your code.
  • Know the cost of new features.
  • Know the minimum work needed to accomplish the job.
To gather information on the performance of your code, you can use the performance monitor (perfmon.exe).


Missed cache hits, on both the internal and external cache, as well as page faults (going to secondary storage for program instructions and data) slow the performance of a program.
A CPU cache hit can cost your program 10–20 clock cycles. An external cache hit can cost 20–40 clock cycles. A page fault can cost one million clock cycles (assuming a processor that handles 500 million instructions/second and a time of 2 millisecond for a page fault). Therefore, it is in the best interest of program execution to write code that will reduce the number of missed cache hits and page faults.
One reason for slow programs is that they take more page faults or miss the cache more often than necessary. To avoid this, it's important to use data structures with good locality of reference, which means keeping related things together. Sometimes a data structure that looks great turns out to be horrible because of poor locality of reference, and sometimes the reverse is true. Here are two examples:
  • Dynamically allocated linked lists can reduce program performance because when you search for an item or when you traverse a list to the end, each skipped link could miss the cache or cause a page fault. A list implementation based on simple arrays might actually be much faster because of better caching and fewer page faults even — allowing for the fact that the array would be harder to grow, it still might be faster.
  • Hash tables that use dynamically allocated linked lists can degrade performance. By extension, hash tables that use dynamically allocated linked lists to store their contents might perform substantially worse. In fact, in the final analysis, a simple linear search through an array might actually be faster (depending on the circumstances). Array-based hash tables (so-called "closed hashing") is an often-overlooked implementation which frequently has superior performance.


Sorting is inherently time consuming compared to many typical operations. The best way to avoid unnecessary slowdown is to avoid sorting at critical times. You may be able to:
  • Defer sorting until a non-performance–critical time.
  • Sort the data at an earlier, non-performance–critical time.
  • Sort only the part of the data that truly needs sorting.
Sometimes, you can build the list in sorted order. Be careful, because if you need to insert data in sorted order, you may require a more complicated data structure with poor locality of reference, leading to cache misses and page faults. There is no approach that works in all cases. Try several approaches and measure the differences.
Here are some general tips for sorting:
  • Use a stock sort to minimize bugs.
  • Any work you can do beforehand to reduce the complexity of the sort is worthwhile. If a one-time pass over your data simplifies the comparisons and reduces the sort from O(n log n) to O(n), you will almost certainly come out ahead.
  • Think about the locality of reference of the sort algorithm and the data you expect it to run on.
There are fewer alternatives for searches than for sorting. If the search is time-critical, a binary search or hash table lookup is almost always best, but as with sorting, you must keep locality in mind. A linear search through a small array can be faster than a binary search through a data structure with a lot of pointers that causes page faults or cache misses.


The Microsoft Foundation Classes (MFC) can greatly simplify writing code. When writing time-critical code, you should be aware of the overhead inherent in some of the classes. Examine the MFC code that your time-critical code uses to see if it meets your performance requirements. The following list identifies MFC classes and functions you should be aware of:
  • CString   MFC calls the C run-time library to allocate memory for a CString dynamically. Generally speaking, CString is as efficient as any other dynamically-allocated string. As with any dynamically allocated string, it has the overhead of dynamic allocation and release. Often, a simple char array on the stack can serve the same purpose and is faster. Don't use a CString to store a constant string. Use const char * instead. Any operation you perform with a CString object has some overhead. Using the run-time library string functions may be faster.
  • CArray   A CArray provides flexibility that a regular array doesn't, but your program may not need that. If you know the specific limits for the array, you can use a global fixed array instead. If you use CArray, use CArray::SetSize to establish its size and specify the number of elements by which it grows when a reallocation is necessary. Otherwise, adding elements can cause your array to be frequently reallocated and copied, which is inefficient and can fragment memory. Also be aware that if you insert an item into an array, CArray moves subsequent items in memory and may need to grow the array. These actions can cause cache misses and page faults. If you look through the code that MFC uses, you may see that you can write something more specific to your scenario to improve performance. Since CArray is a template, for example, you might provide CArray specializations for specific types.
  • CList   CList is a doubly linked list, so element insertion is fast at the head, tail, and at a known position (POSITION) in the list. Looking up an element by value or index requires a sequential search, however, which can be slow if the list is long. If your code does not require a doubly linked list you may want to reconsider using CList. Using a singly linked list saves the overhead of updating an additional pointer for all operations as well as the memory for that pointer. The additional memory is not great, but it is another opportunity for cache misses or page faults.
  • IsKindOf   This function can generate many calls and access a lot of memory in different data areas, leading to bad locality of reference. It is useful for a debug build (in an ASSERT call, for example), but try to avoid using it in a release build.
  • PreTranslateMessage   Use PreTranslateMessage when a particular tree of windows needs different keyboard accelerators or when you must insert message handling into the message pump. PreTranslateMessage alters MFC dispatch messages. If you override PreTranslateMessage, do so only at the level needed. For example, it is not necessary to override CMainFrame::PreTranslateMessage if you are interested only in messages going to children of a particular view. Override PreTranslateMessage for the view class instead.
    Do not circumvent the normal dispatch path by using PreTranslateMessage to handle any message sent to any window. Use window procedures and MFC message maps for that purpose.
  • OnIdle   Idle events can occur at times you do not expect, such as between WM_KEYDOWN and WM_KEYUP events. Timers may be a more efficient way to trigger your code. Do not force OnIdle to be called repeatedly by generating false messages or by always returning TRUE from an override of OnIdle, which would never allow your thread to sleep. Again, a timer or a separate thread might be more appropriate.


Code reuse is desirable. However, if you are going to use someone else's code, you should make sure you know exactly what it does in those cases where performance is critical to you. The best way to understand this is by stepping through the source code or by measuring with tools such as PView or Performance Monitor.


Use multiple heaps with discretion. Additional heaps created with HeapCreate and HeapAlloc let you manage and then dispose of a related set of allocations. Don't commit too much memory. If you're using multiple heaps, pay special attention to the amount of memory that is initially committed.
Instead of multiple heaps, you can use helper functions to interface between your code and the default heap. Helper functions facilitate custom allocation strategies that can improve the performance of your application. For example, if you frequently perform small allocations, you may want to localize these allocations to one part of the default heap. You can allocate a large block of memory and then use a helper function to suballocate from that block. If you do this, you will not have additional heaps with unused memory because the allocation is coming out of the default heap.
In some cases, however, using the default heap can reduce locality of reference. Use Process Viewer, Spy++, or Performance Monitor to measure the effects of moving objects from heap to heap.
Measure your heaps so you can account for every allocation on the heap. Use the C run-time debug heap routines to checkpoint and dump your heap. You can read the output into a spreadsheet program like Microsoft Excel and use pivot tables to view the results. Note the total number, size, and distribution of allocations. Compare these with the size of working sets. Also look at the clustering of related-sized objects.
You can also use the performance counters to monitor memory usage.


For background tasks, effective idle handling of events may be faster than using threads. It's easier to understand locality of reference in a single-threaded program.
A good rule of thumb is to use a thread only if an operating system notification that you block on is at the root of the background work. Threads are the best solution in such a case because it is impractical to block a main thread on an event.
Threads also present communication problems. You must manage the communication link between your threads, with a list of messages or by allocating and using shared memory. Managing the communication link usually requires synchronization to avoid race conditions and deadlock problems. This complexity can easily turn into bugs and performance problems.
For additional information, see Idle Loop Processing and Multithreading.


Smaller working sets mean better locality of reference, fewer page faults, and more cache hits. The process working set is the closest metric the operating system directly provides for measuring locality of reference.

2011년 1월 24일 월요일

els 만들기

http://media.daum.net/breakingnews/view.html?cateid=1052&newsid=20090427112106425&p=Edaily

[이데일리 유지은 칼럼니스트] 유환구(이데일리 증권부 기자): 이사님~ 안녕하세요.
유지은(맥쿼리증권 이사): 유기자님도 안녕하시죠? 벌써 4월의 마지막주로 접어들었네요.

유기자: 아 그럼 올해도 벌써 3분의1이 지난 건가요..헐..ㅋ
유이사: 뭐 아직 3분의2나 남은 거죠~ㅎㅎ

유기자: 근데 이사님 지난주에 책을 내셨더군요~ 제목이 `ELW 따라잡기`..요 책도 참고하면 도움이 많이되겠죠?
유이사: 예, 부족하지만 책을 발간했네요.. 정확한 제목이 `바른투자의 지름길 ELW 따라잡기` 에요..

유기자: 바른 투자라면, 이 칼럼에서도 이사님이 늘상 강조하셨던 바였죠~ㅎ 이제 저자로도 이름을 날리실텐데..이거 참 영광입니다 ㅎㅎ
유이사: 에이 별 말씀을..;; 민망한데 빨리 시작해요~ㅎ

처음처럼 유기자 : 그럴까요. 오늘의 주제는 무엇인가요~~
이슬같은 유이사: 넵. 오늘은 ELS전략을 다뤄볼까합니다.
나만의 ELS 만들기!

처음처럼 유기자 : ELS면 주가연계증권 맞죠? 음..ELS가 ELW와 뭔 상관인지...궁금증이 고조되는군요~ㅎ
이슬같은 유이사: 예, ELS는 Equity Linked Securities..기초자산인 주식의 수익률에 연동되어 수익이 결정되는 구조화된 주식형 파생상품입니다. 낯설진않죠?
ELS, ELF, ELD 같은 형제들이 있습니다. 모두 주식에 연동된 구조화 상품들입니다.

처음처럼 유기자: 어렴풋이 알 것 같긴 하지만, 차이를 간단히 좀..
이슬같은 유이사: ELS라고 하면 보통 증권회사를 통해 거래하게 되고 ELD(Equity Linked Deposit)는 은행을 통해 가입하게 되는 주식에 연계된 예금 상품입니다.
ELF(Equity Linked Fund)는 증권사나 은행을 통해 가입하게 되는데 한마디로 ELS에 투자하는 펀드라고 생각하면 됩니다.

처음처럼 유기자 : DLS도 있죠?..파생상품 연계증권인가? 음..살짝 아는척 ;;
이슬같은 유이사: 넵. 기초자산이 주식이 아닌경우를 DLS로 표현합니다~
암튼 위의 EL* 상품들은 모두 다 주식에 연계된 구조화 상품이라는 점에서는 형제죠. 이런 주식연계 구조화상품은 원금보존 또는 일부보존을 위해 채권을 활용하고 주식의 수익률에 연동시키기 위해 옵션을 활용하게 됩니다.
결국 옵션을 채권 등과 적절히 조합해 특정 조건에 맞는 수익률을 발생시키도록 만들어진 상품인거죠.

처음처럼 유기자 : 이때 옵션이 바로 ELW 가 되는 거군요~!
이슬같은 유이사: 맞슴돠~ㅎㅎ 옵션의 성격을 갖고 있는 ELW를 잘 활용하면 원금을 일정부분 보존하면서 저렴한 비용으로 `나만의 ELS`를 만들 수 있습니다!!
나만의 ELS를 구성하게 되면 해외지수와 코스닥 종목을 포함한 다양한 종목을 기초자산으로 선택할 수 있다는 장점이 있을 뿐 아니라 ELW에 투자하는 부분은 언제든지 현금화할 수 있고 거래비용 또한 저렴하다는 장점까지 있으니 투자의 편이성 측면에서 훨씬 유리하겠죠?

처음처럼 유기자 : 근데...나만의 ELS 라..딱 와닿지는 않는데..흠..ㅎㅎ
이슬같은 유이사: 그럴땐..적당한 예가 필요하겠죠 ㅎㅎ
어떤 다소 보수적인 성향의 투자자가 1억원을 갖고 있다고 가정해보겠습니다.
원금을 손해를 보긴 싫지만 코스피지수에 대해서는 장기적으로 2년정도를 투자기간으로 볼때 어느정도 상승이 가능하다고 보고있다고 가정하죠.
그런데 1억이나 되는 투자자금으로 직접 주식을 투자하자니 마음이 편치않고 예상과 달리 주가가 오르지 못하면 원금손실 위험이 커서 망설여지지만 그래도 주가가 진짜 오른다면 매우 배가 아플 것 같습니다. 예상은 했는데 손실이 두려워서 투자를 못했기 때문에..

처음처럼 유기자 : 그렇겠죠..사례가 어째 제 경우인듯..저랑 심리가 비슷해요~ ㅋ 아 1억원만 빼고 ㅎ
이슬같은 유이사: ㅋㅋ보수적 성향이시군요~

처음처럼 유기자 : 음..소심한 성향 ㅋ
이슬같은 유이사: 그렇다면 2년 정도의 투자기간 동안 원금을 보장하면서 지수상승에 대한 가능성도 열어두고 싶다면 어떻게하는 게 좋을까요..

처음처럼 유기자 : 원금을 보장하도록 하면서 주가 수익률도 누리는 방법이라..
이슬같은 유이사: 물론 모든 투자자들이 돈 잃는 건 당연히 싫어합니다.. 자 방법은 바로 나만의 ELS에 있습니다.

처음처럼 유기자 : 우와~ 두둥..ㅎㅎ
이슬같은 유이사: 주가지수에 따라 수익률이 결정되는 나만의 원금보장형 ELS를 만들면 됩니다. 기본적으로 ELS는 원금 보존을 추구하면서 주가 수익률에 참여하는 상품입니다. 즉 원금보장형 ELS라는 것은 만기 시에 원금 전액을 보장해 주면서 기초자산인 주식 혹은 지수가 상승할 때 상승부분에 대한 일부 상승 참여율을 갖는 구조죠.
이런 구조를 만들려면 우선 2년이라는 투자기간 후에 원금의 100%를 돌려주는 무위험 투자수단에 투자금의 대부분을 예치를 해야 합니다.



▲ 나만의 ELS만들기

처음처럼 유기자 : 무위험 투자수단이라면 예금이나 채권..?
이슬같은 유이사: 그렇죠. 근데 2년간 무위험 정기예금이나 채권으로 복리이자를 받을 수 있다고 가정하면 2년 후에 1억원을 받기위해 현재 1억원을 모두 예금할 필요는 없죠. 2년동안 발생할 이자를 감안해야겠죠. 따라서 예금할 금액은 2년 후 받을 이자를 포함해 1억원이 되는 금액일 것입니다.
예를 들어 현재의 무위험 이자율을 4%라고 가정하면 2년 후 1억원을 갖기 위해서 9245만원이필요하죠. 9245만원을 이자율 4%로 예금하면 2년후에 1억원을 받게됩니다. 9245만원을 제외한 나머지 754만4379원은 투자 가능한 여유자금으로 활용을 할 수 있습니다.
754만 4379원으로 직접 주가지수를 사는 대신 코스피200지수를 기초자산으로 하는 콜 ELW를 매수함으로써 나만의 ELS를 구성할 수 있습니다.

처음처럼 유기자 : 아..그런 원리군요..누군지 참 머리좋은 사람이 만든 것 같네요~ㅋ
이슬같은 유이사: ㅋㅋ 근데 아직 예가 안끝났는데..ㅋㅋ

처음처럼 유기자 : 아 예..계속해주세요~ㅎ
이슬같은 유이사: 현재 코스피200 지수가 171이고 맥쿼리9136코스피200콜은 790원입니다.
그럼 9550주를 살 수 있겠죠.

처음처럼 유기자 : 거래수수료는 없는 걸로 가정하는거죠?
이슬같은 유이사: 예. 이 투자자의 예상대로 코스피지수가 상승해 2년이 아닌 1달 후 주가가 200까지 상승했다고 가정해보죠. 1달 후 5월21일에 기초자산인 코스피200지수가 200까지 상승하면 맥쿼리9136코스피200콜은 약 2800원까지 상승할 것으로 예상됩니다.(다른 조건의 변화가 없다고 가정)
그렇다면 총수익은 1900만원이 넘겠죠. ELW의 레버리지 효과로 인해 기초자산 17%상승에 ELW는 300% 이상 상승했습니다. 적은 금액으로도 더 큰 수익을 올릴 수가 있었던거죠. ELW를 통해 발생한 수익은 투자금 전액인 1억원 대비로 보더라도 1달이라는 짧은 기간 동안 19%에 달하는 수익이죠.

처음처럼 유기자: 그런데 만약 투자기간 동안 주가지수가 상승하지 않거나 하락한다면 어쩌죠?
이슬같은 유이사: 그럴 경우 최대 손실액은 ELW에 투자한 전액인 755만원이 되겠죠.
무엇보다도 2년 후에는 1억원의 원금을 그대로 손에 쥘 수 있다는 점이 중요합니다.



처음처럼 유기자 : 음 그렇군요..
이슬같은 유이사: ELW를 효과적으로 활용하면 투자자산을 안정적으로 운용하면서도 높은 수익까지 기대할 수 있는 나만의 ELS를 구성할 수 있습니다. 이런 전략은 투자자 각자의 위험 선호도에 따라 얼마든지 변형이 가능합니다.
만약 특정주식에 대한 주가전망을 갖고 있다면 위험선호도에 따라 앞의 예처럼 원금을 100% 보장할 수도 있고 좀 더 적극적인 투자자나 투자전망에 확신이 있다면 원금 100%를 조금 포기해서 더 많은 자금을 ELW에 투자할 수도 있겠죠.

처음처럼 유기자 : 원금 손실을 어느 정도 감수하느냐에 따라 달라질 수 있겠군요.
이슬같은 유이사: 예, 예를 들어 나는 원금의 10%정도 손실은 감수할 용의가 있다면 무위험 자산에 대한 투자비중을 다소 줄이고 ELW에 대한 투자를 좀 더 늘릴 수 있습니다.
이렇게 하면 투자기간 동안 원금 전액을 보장하지 않아도 예상이 맞았을 경우 좀 더 큰 수익을 낼 수 있겠죠. 이렇게 ELW를 활용해 나만의 ELS를 직접 디자인하여 운용하면
따라서 좀더 유연한 투자가 가능해 투자선호도에 맞는 투자수익 또한 극대화 할 수 있을 것입니다.
하지만 큰 수익을 낼 수 있는 기회는 큰 위험도 수반하는 법이죠.
수익에만 욕심낼 게 아니라 각자의 위험선호도, 또 주가에 대한 전망에 따라 ELW 편입비율을 조절해야겠죠~

처음처럼 유기자 : 넵. 오늘도 명쾌한 설명 감사드립니다~
이슬같은 유이사: 예, 그럼 다음 시간에 또 만나요~ㅎㅎ